You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ uname -a
Darwin brians-MacBook-Pro.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
time.Date not handling location as it was in previous versions of go
time: Date not handling location as it was in previous versions of go
Oct 15, 2019
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.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes, seems to be in 1.13.x currently.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/1-gK7cWKVEO
What did you expect to see?
1.13 you get
What did you see instead?
1.12.7 you get
The text was updated successfully, but these errors were encountered: