-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: LoadLocationFromTZData with slim tzdata uses wrong cached zone #42216
Comments
Change https://golang.org/cl/264939 mentions this issue: |
Is this going to be backported to 1.15? |
I expect so. |
Change https://golang.org/cl/266299 mentions this issue: |
…data The extend information of a time zone file with last transition < now could result in a wrong cached zone because it used the zone of the last transition. This could lead to wrong zones in systems with slim zoneinfo. For #42216 Fixes #42138 Change-Id: I7c57c35b5cfa58482ac7925b5d86618c52f5444d Reviewed-on: https://go-review.googlesource.com/c/go/+/264939 Trust: Tobias Klauser <[email protected]> Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> (cherry picked from commit 70e022e) Reviewed-on: https://go-review.googlesource.com/c/go/+/266299 Trust: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Tobias Klauser <[email protected]>
<comment removed, picked wrong issue, sorry> |
Backport issue(s) opened: #42520 (for 1.15). 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
)?Does this issue reproduce with the latest release?
Yes, it can be reproduced with 1.15: see #42138 .
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
tzdata
)tzdata
package (which uses slim zoneinfo with IANA 2020b)See https://gist.github.com/hlubek/f46a73bc9d150cf1f2af585b0849e3d9 on how to reproduce.
What did you expect to see?
The correct time zone for the dates in CET.
What did you see instead?
The zone CEST.
Notes
It seems to be the case, that the cached zone which is calculated from the transitions in
LoadLocationFromTZData
just uses the last transition zone instead of checking for the correct zone from the result oftzset
when using theextend
data from the time zone file.The text was updated successfully, but these errors were encountered: