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
I've traced it to src/time/format.go, which consumes any integers following the letters GMT.
The minutes (after the colon) then cause a parse failure.
Because the letters GMT are treated specially, I don't think it's possible to parse this time with the time package.
The text was updated successfully, but these errors were encountered:
minux
changed the title
Time package: Cannot parse GMT timezones with colon-separated offsets
time: cannot parse GMT timezones with colon-separated offsets
Feb 15, 2015
I apologize for not picking up this issue earlier, but it is now too late to fix for the 1.5 release: it would be unwise to change the internals of time.Parse and time.Format at this late date. I will mark it to be addressed early in the 1.6 release cycle.
Unfortunate. The special handling of GMT, which is needed for other things, makes it very difficult to know whether the :10:00 should be considered part of the time zone or left alone to match the layout.
go version
go version go1.4 linux/amd64
uname -a
Linux daniel-linux 3.16.0-28-generic #38-Ubuntu SMP Fri Dec 12 17:37:40 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
This program shows my attempt to parse the time: http://play.golang.org/p/2-YXz2wdIx
I've traced it to
src/time/format.go
, which consumes any integers following the lettersGMT
.The minutes (after the colon) then cause a parse failure.
Because the letters
GMT
are treated specially, I don't think it's possible to parse this time with thetime
package.The text was updated successfully, but these errors were encountered: