]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] time: correct unusual extension string cases
authorIan Lance Taylor <iant@golang.org>
Thu, 25 Feb 2021 18:01:56 +0000 (10:01 -0800)
committerDmitri Shuralyov <dmitshur@golang.org>
Mon, 1 Mar 2021 21:51:11 +0000 (21:51 +0000)
commit88f91b709e022900e481261a3c72604b4f01040e
treeaace71801dd21a5aa7d31f40bf2a3c0083be75b5
parent4fd2617cd86ffe21ddd0fda6d8ae30eec1178faa
[release-branch.go1.16] time: correct unusual extension string cases

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 d9fd38e68ba00a51c2c7363150688d0e7687ef84)
Reviewed-on: https://go-review.googlesource.com/c/go/+/297230
src/time/zoneinfo.go
src/time/zoneinfo_test.go