]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.20] 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:16 +0000 (17:51 +0000)
commit65fa8a69312dd64e09e32e4138ccc7278d0693e5
tree7900f114c125f4c15143111b26149de28bf023ff
parentb52a6963bf6dfdddb8f8e7e85d52012ac305476f
[release-branch.go1.20] 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 #59075

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/+/478658
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@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