I’m trying to create a template, where the timezone name is rendered correctly for every post and I don’t see a way to make it work the way I want it.
For this post, written in Bali lately, date:
date: 2016-10-28T17:28:09+08:00
I have the output set to:
{{ .Date.Format "January 2, 2006 15:04 MST" }}
and I’d like it to render:
Friday, October 28, 2016 17:28 WITA
but instead it does:
Friday, October 28, 2016 17:28 +0800
at least right now, when I’m sitting in Warsaw in the CE(S)T timezone. The funny thing is, the template did render the timezone name when I was running it back in Bali, where the date above was rendering to:
Friday, October 28, 2016 17:28 SGT
(SGT is Singapore time; WITA is the same time offset but for central Indonesia).
Now to the questions:
- Why does the template render the acronym of the timezone only for the current timezone I’m in at the moment? Can I force it to render all acronyms?
- Can I force it to render the correct acronym? Ie.
WITA
instead ofSGT
?
I can’t see anything in Go’s time
documentation on this and right now the only solution I found is to enter the timezone manually into the post’s meta:
date: 2016-10-28T17:28:09+08:00
timezone: WITA