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: Date not handling location as it was in previous versions of go #34923
What version of Go are you using (
Oh, never mind, I know what this is. This is due to the fix for #30099. We used to mishandle dates before December 13, 1901, like the date you are testing in the year 0. Now we handle them correctly according the version of the tzdata database on your system. The standard tzdata records that the U.S. switched from local time zones (LMT == Local Mean Time) to what are now the standard timezones in 1883, so dates before 1883 are recorded as being in LMT. The offset for LMT in America/Los_Angeles is -7:52:58, which is why you are seeing these odd results.
Basically, timezones for very old dates are not very useful.