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.15 backport] #44617

Closed
gopherbot opened this issue Feb 25, 2021 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ianlancetaylor requested issue #44385 to be considered for backport to the next 1.15 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 gopherbot added the CherryPickCandidate Used during the release process for point releases label Feb 25, 2021
@gopherbot gopherbot added this to the Go1.15.9 milestone Feb 25, 2021
@gopherbot
Copy link
Author

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

@dmitshur
Copy link
Contributor

dmitshur commented Mar 1, 2021

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

@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Mar 1, 2021
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 #44617

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/+/297229
@gopherbot
Copy link
Author

Closed by merging 6bb9600 to release-branch.go1.15.

@toothrot toothrot modified the milestones: Go1.15.9, Go1.15.10 Mar 10, 2021
@golang golang locked and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants