chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
577 stars 262 forks source link

[Bug] Posts that have today's date but no time get first published at the end of the day #446

Closed machiav3lli closed 1 year ago

machiav3lli commented 1 year ago

I confirm:

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

  1. create content with today's date, no time
  2. push/compile
  3. Voila! no posts to see…
  4. On the next day the posts are there

Relevant log output

No response

Related code

No response

Preferred solution

Other information

No response

onweru commented 1 year ago

@machiav3lli, this is not a bug. In such scenarios, you have to add the --buildFuture flag https://gohugo.io/commands/hugo_server/#options

machiav3lli commented 1 year ago

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

onweru commented 1 year ago

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.

machiav3lli commented 1 year ago

Thanks! your pointer was mostly right, it was actually the docker using UTC, and now I changed it using the variable TZ: "CET"