chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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:

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

  • posts without time, get handled as having 00:00:00 post time → gets posted on the same date.

Other information

No response

commented

@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

commented

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"