time: AddDate(0, 0, 1) gives the same exact day in Samoa edge case #29602
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was testing that my code was properly adding a day to a weird Samoa edge case where they skipped a day at the end of 2011 (
2011-12-29
+ 1 day is2011-12-31
).https://play.golang.org/p/RomvXuHl3Pi
What did you expect to see?
Adding a day to
2011-12-29
in Samoa should give2011-12-31
after normalization.What did you see instead?
Adding a day to
2011-12-29
in Samoa normalizes down and thus gives exactly the same date and hourAdditional information
If we set the hour to 10am or above on
2011-12-29
in Samoa, this works fine.https://play.golang.org/p/eOX7s2P10-u
The text was updated successfully, but these errors were encountered: