Skip to content
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 incorrect zone [1.16 backport] #44618

Closed
gopherbot opened this issue Feb 25, 2021 · 3 comments
Closed

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 25, 2021

@ianlancetaylor requested issue #44385 to be considered for backport to the next 1.16 minor release.

@gopherbot Please open backport issues.

We mishandle a couple of cases in the time extension strings used by the slim tzdata format. The slim format is likely to appear on more and more systems going forward, and is what we use when people use the time/tzdata package.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Feb 27, 2021

Change https://golang.org/cl/297230 mentions this issue: [release-branch.go1.16] time: correct unusual extension string cases

@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Mar 1, 2021

Approving as a serious issue without a workaround. This backport applies to both 1.16 (this issue) and 1.15 (#44617).

gopherbot pushed a commit that referenced this issue Mar 1, 2021
This fixes two uncommon cases.

First, the tzdata code permits timezone offsets up to 24 * 7, although
the POSIX TZ parsing does not. The tzdata code uses this to specify a
day of week in some cases.

Second, we incorrectly rejected a negative time offset for when a time
zone change comes into effect.

For #44385
Fixes #44618

Change-Id: I5f2efc1d385e9bfa974a0de3fa81e7a94b827602
Reviewed-on: https://go-review.googlesource.com/c/go/+/296392
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
(cherry picked from commit d9fd38e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/297230
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Mar 1, 2021

Closed by merging 88f91b7 to release-branch.go1.16.

@gopherbot gopherbot closed this Mar 1, 2021
@toothrot toothrot modified the milestones: Go1.16.1, Go1.16.2 Mar 10, 2021
@mastercactapus mastercactapus mentioned this issue Mar 16, 2021
7 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants