]> Cypherpunks repositories - gostls13.git/commit
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>
Tue, 27 Oct 2020 23:36:05 +0000 (23:36 +0000)
commit70e022e4a83dc996ac4f108e811fbc399ad5565b
treed0f0d3af77fc4516391848333f50e935752086ce
parent5d3666e1a48d0976718c75dddc2ef0232be835d8
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 #42216

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>
src/time/zoneinfo_read.go
src/time/zoneinfo_test.go