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
--- Overview:
time.LoadLocation() on POSIX systems eventually uses loadZoneData() in zoneinfo_read.go
to parse a zoneinfo file for timezone data. When the zoneinfo file doesn't contain any
timezone transition data -- see, for example, "Etc/GMT+4" -- this causes calls
to Location.lookup() to return UTC times (line 104, zoneinfo.go).
Since FixedZone() creates a Location with a single fake transition (line 86,
zoneinfo.go), it seems like the "best" solution here is to do the same for
zoneinfo files that are also fixed. I've attached a patch to this bug report, I'd have
submitted it for review but mercurial on Goobuntu is Too Damn Old to run the codereview
plugin :-/
--- What steps will reproduce the problem?
An example that *should* work is here:
http://play.golang.org/p/0OqoIdw3gk
Unfortunately play.golang.org doesn't have timezone data available. It works when 'go
run'
--- What is the expected output?
Time is: 2004-03-02 13:14:15 +0000 UTC
Time in GMT+4 is: 2004-03-02 09:14:15 -0400 GMT+4
--- What do you see instead?
Time is: 2004-03-02 13:14:15 +0000 UTC
Time in GMT+4 is: 2004-03-02 13:14:15 +0000 UTC
--- Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
--- Which operating system are you using?
Various debian-based linuxes (found the bug at home, reported it from work)
--- Which version are you using? (run 'go version')
go 1.0.2
Attachments:
The text was updated successfully, but these errors were encountered: