]> Cypherpunks repositories - gostls13.git/commit
time: expand acceptance of time zones when parsing
authorRob Pike <r@golang.org>
Thu, 15 Aug 2013 06:42:54 +0000 (16:42 +1000)
committerRob Pike <r@golang.org>
Thu, 15 Aug 2013 06:42:54 +0000 (16:42 +1000)
commita454d2fd2e6a60648728ca6c959a7c0b24119fec
treef57dcbe4b4b38fbbb436766da2a525f1db787c24
parentec837ad73c20d9b33d8aea9d79ce68bf95598544
time: expand acceptance of time zones when parsing
I tried to make it absolutely correct but there are too many
conflicting definitions for the official list of time zones.
Since when we're parsing we know when to expect
a time zone and we know what they look like if not exactly
what the definitive set is, we compromise. We accept any
three-character sequence of upper case letters, possibly
followed by a capital T (all four-letter zones end in T).

There is one crazy special case (ChST) and the possibility
of a signed hour offset for GMT.

Fixes #3790
I hope forever, but I doubt that very much.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12969043
src/pkg/time/format.go