-
Notifications
You must be signed in to change notification settings - Fork 18k
time: ParseInLocation error #49284
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
Comments
This does seem a bug. In absence of a timezone indicator, |
Change https://golang.org/cl/360616 mentions this issue: |
seems a bug loc:= time.FixedZone("Asia/Shanghai",3600*8) |
thank u, i'll try it |
The actual time between 1991-04-14 02:00:00 to 1991-09-15 01:00:00 in Asia/Shanghai is Daylight Saving Time. We can't use fixed offset for it. This bugs happens because it get an incorrect offset in the function time.Data: Line 1444 in bd580a0
At that time. the start is invalid, we can't get the correctly offset by lookup(start-1). @FreeDemon You can try the CL above. I think It can solve this problem. |
@gopherbot please open backport to 1.16 and 1.17 |
Backport issue(s) opened: #49406 (for 1.16), #49407 (for 1.17). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Why are these times incorrect and missed some time ?
What did you expect to see?
1991-09-14 16:50:50 +0900 CDT
1991-09-14 17:00:00 +0900 CDT
1991-09-15 00:50:00 +0900 CDT
1991-09-15 01:00:00 +0800 CST
What did you see instead?
1991-09-14 16:50:50 +0900 CDT
1991-09-14 18:00:00 +0900 CDT
1991-09-15 01:50:00 +0900 CDT
1991-09-15 01:00:00 +0800 CST
The text was updated successfully, but these errors were encountered: