You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @flimzy,
I initially saw that but dismissed it thinking I was only interested in "local" (which gopherjs sort of supports). Which led me to finding JS's toLocaleString() I thought oh this is probably just a missing options in gopherjs because I could easily do the following in JS:
var event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
console.log(event.toLocaleString('default', { timeZoneName: 'short' }));
console.log(event.toLocaleString('default', { timeZoneName: 'long' }));
will output:
12/19/2012, 10:00:00 PM EST
12/19/2012, 10:00:00 PM Eastern Standard Time
But after looking at #64 in detail, I think my issue is related. :-(
Maybe I'll use goment (an pure golang implementation of moment.js mentioned in #64) instead.
nathanhack
changed the title
Time.Format() time zone in gopherjs does not match golang
Time.Format() local time zone in gopherjs does not match golang
Jun 3, 2019
Hi, I was using time and needed the short form of the time zone.
But it seems that gopherjs only does the long form.
What happened:
https://gopherjs.github.io/playground/#/8x_apJ2hLw
What I expected:
https://play.golang.org/p/6MlgfsMJ18W
I looked through the issues and I looked at the Gotchas but didn't see anything there. Maybe this is a known thing?
The text was updated successfully, but these errors were encountered: