gohugoio / hugoDocs

The source for https://gohugo.io/
Apache License 2.0
1.05k stars 1.48k forks source link

Clarify that a numeric timezone must be "-07:00" #2580

Closed xuhdev closed 3 months ago

xuhdev commented 3 months ago

I'm guessing this is true based on https://github.com/gohugoio/hugo/issues/12495#issuecomment-2111509436?

I'm also thinking that removing "America/Los_Angeles" may reduce confusion...

jmooring commented 3 months ago

This is incorrect. Those are examples of parsable values, not layout strings, and the offset can be anything. Again, I think there's a conceptual disconnect here. The layout string is described here:

https://gohugo.io/functions/time/format/#layout-string

xuhdev commented 3 months ago

Just wanna make sure I understand it right: If the layout string contains a timezone offset, it must be "+7:00" or "-7:00". Is this correct?

jmooring commented 3 months ago

As described here...

https://gohugo.io/methods/time/format/#layout-string

...it can be any of these:

image