Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
time: AddDate(0, 0, 1) gives the same exact day in Samoa edge case #29602
What version of Go are you using (
changed the title
time.AddDate(0, 0, 1) gives the same exact day in Samoa edge case
Jan 8, 2019
Icann refers to this behavior as the "date line correction" which is not implemented by the time package. For dates before the timezone creation, it defaults to UTC-10 in Pacific. The same behavior can be observed for Kiribati new timezone "Pacific/Kiritimati" which was created on 30 Dec 1994, i.e. next day is 1 Jan 1995 only at 10 AM..