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

gopherbot opened this issue Feb 25, 2021 · 3 comments


Copy link

@gopherbot gopherbot commented Feb 25, 2021

@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.

Copy link

@gopherbot gopherbot commented Feb 27, 2021

Change mentions this issue: [release-branch.go1.15] time: correct unusual extension string cases

Copy link

@dmitshur 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).

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
Trust: Ian Lance Taylor <>
Run-TryBot: Ian Lance Taylor <>
TryBot-Result: Go Bot <>
Reviewed-by: Tobias Klauser <>
(cherry picked from commit d9fd38e)
Copy link

@gopherbot gopherbot commented Mar 1, 2021

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

@gopherbot gopherbot closed this Mar 1, 2021
@toothrot toothrot modified the milestones: Go1.15.9, Go1.15.10 Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants