]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] time: fix timezone lookup logic for non-DST zones
authorGeon Kim <geon0250@gmail.com>
Sat, 11 Mar 2023 00:57:57 +0000 (00:57 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 23 Mar 2023 17:51:14 +0000 (17:51 +0000)
commit2adec52b5a0bf9288cf17f10f050dde1dcd94b5d
tree0a09593854f64610933d2fb7df07cd37af4290c5
parent826fa3e515b46237ae61329bad1ba7da3cf28b51
[release-branch.go1.19] time: fix timezone lookup logic for non-DST zones

This change fixes time.LoadLocationFromTZData and time.Location.lookup logic if the given time is after the last transition and the extend string doesn't have the DST rule.

For #58682
Fixes #59074

Change-Id: Ie34a6d658d14c2b33098b29ab83c041ef0d34266
GitHub-Last-Rev: f6681eb44c0ea0772004e56eb68fcbd9023d971e
GitHub-Pull-Request: golang/go#58684
Reviewed-on: https://go-review.googlesource.com/c/go/+/471020
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
(cherry picked from commit 90dde5dec1126ddf2236730ec57511ced56a512d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/478657
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
src/time/time_test.go
src/time/zoneinfo.go
src/time/zoneinfo_read.go
src/time/zoneinfo_test.go