aboutsummaryrefslogtreecommitdiff
path: root/src/go.mod
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-04-05 12:12:25 -0700
committerIan Lance Taylor <iant@golang.org>2021-04-12 21:24:29 +0000
commit06c9756333bb506dcbf322be77af85b3162b6345 (patch)
treedc7ff18f6ece76971fb29e74573729310b721fc1 /src/go.mod
parent8c163e85267d146274f68854fe02b4a495586584 (diff)
downloadgo-06c9756333bb506dcbf322be77af85b3162b6345.tar.gz
go-06c9756333bb506dcbf322be77af85b3162b6345.zip
[release-branch.go1.15] time: use offset and isDST when caching zone from extend string
If the current time is computed from extend string and the zone file contains multiple zones with the same name, the lookup by name might find incorrect zone. This happens for example with the slim Europe/Dublin time zone file in the embedded zip. This zone file has last transition in 1996 and rest is covered by extend string. tzset returns IST as the zone name to use, but there are two records with IST name. Lookup by name finds the wrong one. We need to check offset and isDST too. In case we can't find an existing zone, we allocate a new zone so that we use correct offset and isDST. I have renamed zone variable to zones as it shadowed the zone type that we need to allocate the cached zone. Backport note: this change also incorporates portions of CL 264077. For #45370 Fixes #45384 Change-Id: I43d416d009e20878261156c821a5784e2407ed1f Reviewed-on: https://go-review.googlesource.com/c/go/+/307212 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Diffstat (limited to 'src/go.mod')
0 files changed, 0 insertions, 0 deletions