Bug in timezone: iana.org or the Go library?

546 views
Skip to first unread message

RickyS

unread,
Jun 2, 2014, 8:33:03 PM6/2/14
to golan...@googlegroups.com
After seeing some puzzling results from time display, I wrote a Go program to go through the entire timeinfo.zip from iana.org.
The files are in /usr/local/go/lib/time
I even re-ran the script update.bash to get the latest version.  No improvement.

12 places are seen by Go.time to have bogus entries
ERR at Location: 'unknown time zone America/Godthab'
ERR at Location: 'unknown time zone America/Santiago'
ERR at Location: 'unknown time zone Antarctica/Palmer'
ERR at Location: 'unknown time zone Asia/Tel_Aviv'
ERR at Location: 'unknown time zone Asia/Jerusalem'
ERR at Location: 'unknown time zone Asia/Gaza'
ERR at Location: 'unknown time zone Asia/Hebron'
ERR at Location: 'unknown time zone Chile/Continental'
ERR at Location: 'unknown time zone Chile/EasterIsland'
ERR at Location: 'unknown time zone Israel'
ERR at Location: 'unknown time zone Pacific/Fiji'
ERR at Location: 'unknown time zone Pacific/Easter'

Israel and some Pacific islands get hit the hardest.  I can't tell at this point where the bug is, iana.org or the library.
Could you run the program at https://github.com/RickyS/ZoneInfo and see if you get the same results?
If so, I'll file a bug somewhere.
My system is:
Description:    Ubuntu 14.04 LTS
Codename:    trusty
Linux sda8 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 x86_64 GNU/Linux
jessie/sid

go version go1.2.1 linux/amd64

You only have to download the 1 source file, it's completely self-contain for easy testing.

  RickyS

P.S. Godthab is in Greenland, not the US.  That's not Go's fault.
P.P.S.  I tried to think of a conspiracy theory that explains all the locations, but I think human error wins out over malice.  Or it's really deep.


Rob Pike

unread,
Jun 2, 2014, 8:53:44 PM6/2/14
to RickyS, golan...@googlegroups.com
I suspect version skew of some kind. I see 0 errors with the list in
the source and the list I get from running your script.

-rob

Ian Lance Taylor

unread,
Jun 2, 2014, 9:24:01 PM6/2/14
to Rob Pike, RickyS, golan...@googlegroups.com
On Mon, Jun 2, 2014 at 5:53 PM, Rob Pike <r...@golang.org> wrote:
> I suspect version skew of some kind. I see 0 errors with the list in
> the source and the list I get from running your script.

http://golang.org/issue/8134 ?

Ian


> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Rob Pike

unread,
Jun 2, 2014, 10:58:39 PM6/2/14
to Ian Lance Taylor, RickyS, golan...@googlegroups.com
I was right, version skew. Glad it's fixed. Thanks for reporting it.

-rob

RickyS

unread,
Jun 3, 2014, 1:46:35 AM6/3/14
to golan...@googlegroups.com, r...@golang.org, rickys...@gmail.com
That looks like it.  Must be version 3 data.

RickyS

unread,
Jun 3, 2014, 3:17:31 AM6/3/14
to golan...@googlegroups.com, r...@golang.org, rickys...@gmail.com
Go 1.3 Release Candidate 1 for linux/amd64 has the same problem, except that instead of 12 bad cases, there are 18.

The 6 additional cases appear to be:
ERR at Location: 'unknown time zone Asia/Riyadh87'
ERR at Location: 'unknown time zone Asia/Riyadh88'
ERR at Location: 'unknown time zone Asia/Riyadh89'
ERR at Location: 'unknown time zone Mideast/Riyadh87'
ERR at Location: 'unknown time zone Mideast/Riyadh88'
ERR at Location: 'unknown time zone Mideast/Riyadh89'

This is the same program, but a different zoninfo.zip:
 -rw-r--r--   1 root     root       358933 Jun  2 08:23 go/lib/time/zoneinfo.zip  ## go1.3rc1
 -rw-r--r--   1 ricky    ricky      374754 Jun  3 00:43 go1.2.1/lib/time/zoneinfo.zip


David Symonds

unread,
Jun 3, 2014, 3:37:47 AM6/3/14
to RickyS, golang-nuts, Rob Pike

Are you able to test tip?

Ricky Seltzer

unread,
Jun 3, 2014, 4:03:07 AM6/3/14
to David Symonds, golang-nuts, Rob Pike
On 06/03/2014 10:37 AM, David Symonds wrote:

Are you able to test tip?


Haven't yet.  If you have tip, you can download just the one .go file and see what results you get.
RickyS

RickyS

unread,
Jun 4, 2014, 7:08:30 AM6/4/14
to golan...@googlegroups.com, dsym...@golang.org, r...@golang.org
Today I was able to test my program against tip and there are just 6 errors found.  The 6 versions of Riyadh I showed above.
I fetched tip with this, and built it:
    hg clone -u tip https://code.google.com/p/go

It was a little confusing, as  'go version' is the same for tip as for go1.3rc1.
   Ricky

PS I don't think anybody actually lives in "Riyadh89", they live in "Riyadh".  So I wouldn't worry.

roarof...@gmail.com

unread,
Jun 10, 2014, 12:24:10 PM6/10/14
to golan...@googlegroups.com
The fix that has been done for this (issue 8134) did not make it into go1.3rc1 

Ian Lance Taylor

unread,
Jun 10, 2014, 2:09:58 PM6/10/14
to roarof...@gmail.com, golang-nuts
Correct.

it will in the final 1.3 release, though. It's already on the 1.3
release branch.

Ian
Reply all
Reply to author
Forward
0 new messages