Closed
Description
- What version of Go are you using (
go version
)?
go1.6 (playground) - What operating system and processor architecture are you using (
go env
)?
nacl (playground) - What did you do?
https://play.golang.org/p/qZ-RocY8nm - What did you expect to see?
Output should be:
1s
2s - What did you see instead?
1s
1s
When calculating a Duration that crosses a leap second, go reports an incorrect duration. Note that in the playground example we are parsing UTC time and the UTC standard requires adherence to leap seconds.
This also means that the definition of the zero value of time.Time
is incorrect.
The documentation states: "The zero value of type Time is January 1, year 1, 00:00:00.000000000 UTC". This is incorrect.
The zero value of time.Time is actually January 1, year 1, 00:00:26.000000000 UTC