-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time: parsing a time with UnixDate layout ignores time zone #11815
Comments
Time zone names like MST and PST are parsed based on your local timezone information. On my Ubuntu GNU/Linux system, I get different values because the files /usr/share/zoneinfo/MST and /usr/share/zoneinfo/PST8PDT both exist. If files like those do not exist on your system, then the results are expected. I'm closing this as expected, but please feel free to reopen if you disagree. |
I get a different value on OSX, but on the Go Playground it gives the same value. I was expecting a parse error if I gave |
From the time docs:
|
I missed this in the doc. Thanks for pointing it out. |
Create two times that differ only by their time zone. They both return the same value for Unix timestamp even though they are not the same time.
Example:
Output:
The text was updated successfully, but these errors were encountered: