]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] time: fix LoadLocationFromTZData with slim tzdata
authorChristopher Hlubek <christopher.hlubek@networkteam.com>
Mon, 26 Oct 2020 12:44:44 +0000 (13:44 +0100)
committerIan Lance Taylor <iant@golang.org>
Thu, 29 Oct 2020 23:29:37 +0000 (23:29 +0000)
commit592e24a783f7a68ce301f01401d4efb09099b205
tree5665c97092aebe74bc3c6c28cf5d981cf3c1e79c
parentcfc89399c9e3c9409efce3d0e88f7cde58cc469d
[release-branch.go1.14] time: fix LoadLocationFromTZData with slim tzdata

The extend information of a time zone file with last transition < now
could result in a wrong cached zone because it used the zone of the
last transition.

This could lead to wrong zones in systems with slim zoneinfo.

Fixes #42155

Change-Id: I7c57c35b5cfa58482ac7925b5d86618c52f5444d
Reviewed-on: https://go-review.googlesource.com/c/go/+/264939
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 70e022e4a83dc996ac4f108e811fbc399ad5565b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/266303
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/time/zoneinfo_read.go
src/time/zoneinfo_test.go