Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
time: Parse unable to handle timezone offsets with seconds (+00:34:08) #4934
Trying to parse a time string like "0001-01-01 00:34:08+00:34:08" with the pattern "2006-01-02 15:04:05-07:00:00" fails with a: cannot parse "" as ":00". See http://play.golang.org/p/QFdTQ53Wol for small test case. Removing the seconds from the pattern and time string works. The time string seem to be legitimate enough according to http://en.wikipedia.org/wiki/Zoneinfo where America/New_York as an offset with seconds before 1883-11-18 Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58 I ran into this storing a Time struct in postgres as a timestamp with time zone. In my timezone I get "0001-01-01 00:34:08+00:34:08" storing the result of Format(time.RFC3339Nano) on an empty Time struct. I'd be happy to help out fixing this but as my knowledge of time issues is rather limited I'm not sure if it's only a matter of making time/format.go:nextStdChunk handle the seconds in case '-'?