Here’s what I think is happening.
- When a format string is not provided, we fall back to
2006-01-02 15:04:05 -0700 MST. Note that both an offset and abbreviation are provided.
- When the offset is the same as your current time, the local abbreviation for the offset is displayed. Why? I don’t know; I’m not sure it is the right thing to do. Keep reading…
- When the offset is different than your current time, we have no idea what abbreviation to display, so we display the offset again, which is why it looks like it is printed twice.
There is not a 1:1 relationship between offsets and abbreviations. For example, my current offset of
-04:00 could be any of the following: AMT, AST, AT, BOT, CDT, CIDST, CLT, EDT, FKT, GYT, PYT, Q, or VET.
For example: if you authored a page with a -04:00 offset, which timezone abbreviation would you want displayed? Cayman Islands Daylight Saving Time (CIDST)? Falkland Island Time (FKT)? Maybe Guyana Time (GYT)? None of those make sense to me. I’m in Eastern Daylight Time (EDT). They’re all -04.00.
The abbreviation is tied to the TZ environment variable on the machine where Hugo is running. If I change my TZ environment, then run hugo again, I will get different results.
Avoid the confusion. Format your dates, and rely on offsets rather than abbreviations.
This stuff make my head hurt.