[Bug] Posts that have today's date but no time get first published at the end of the day
machiav3lli opened this issue · comments
I confirm:
- I am running the extended version of Hugo version 0.91.0 or above to build my site.
- I have read the Hugo Clarity theme documentation.
- I have used the example site's config files as reference.
- I have reviewed other issues in this repository and mine is not recorded.
Hugo version
v0.112.3+extended
Where is this bug showing up?
In the browser: Hugo builds the site, but something doesn't look right.
Operating system
Arch Linux
Browser (if applicable)
Brave, Firefox
Current behavior
When creating content that have today's date without specific time, no posts are published till the next day.
Expected behavior
Creating content that have today's date without specific time, results them being posted (having post time i.e. 00:00:00)
Steps to reproduce
- create content with today's date, no time
- push/compile
- Voila! no posts to see…
- On the next day the posts are there
Relevant log output
No response
Related code
No response
Preferred solution
- posts without time, get handled as having 00:00:00 post time → gets posted on the same date.
Other information
No response
@machiav3lli, this is not a bug. In such scenarios, you have to add the --buildFuture
flag https://gohugo.io/commands/hugo_server/#options
But that would publish all posts, whether of the same day or planned for future. This is handled differently by other themes e.g. Anubis
I would say check the timezone in the date on the frontmatter. It's most likely something like 2023-07-23T18:02:38Z
.... you need to change it to something like 2023-07-23T18:02:38+03:00
.... I think the Z is for UTC. You should replace the +03:00
with your timezone. Mine is +3 GMT.
Thanks! your pointer was mostly right, it was actually the docker using UTC
, and now I changed it using the variable TZ: "CET"