]> Cypherpunks repositories - gostls13.git/commit
time: enable ZONEINFO tzdata file support and error reporting
authorFlorian Uekermann <florian@uekermann.me>
Fri, 29 Sep 2017 15:12:58 +0000 (17:12 +0200)
committerIan Lance Taylor <iant@golang.org>
Tue, 3 Oct 2017 14:35:32 +0000 (14:35 +0000)
commit630d176e7d5e42e21d176d1b9d48de0e03e7cec8
tree5abda21a8ca7656e93496d44a6bf051f67900f7f
parenta9345307a1c28315c340bbb8bbd2faa55b1b9d0a
time: enable ZONEINFO tzdata file support and error reporting

Loading location data from tzdata files was only supported
from default paths on android. This change enables support on
all OS via the ZONEINFO environment variable and reduces the
amount of android specific code significantly.
Furthermore, unsuccessful calls to LoadLocation now return the
first error encountered, including errors from attempting to
load a location from the source specified by ZONEINFO.
Errors indicating that the source or location was not found are
ignored until all possible sources have been traversed.

Change-Id: I45bc23b92253c9447f12f95f3ca29a7e613ed995
Reviewed-on: https://go-review.googlesource.com/67170
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/time/zoneinfo.go
src/time/zoneinfo_android.go
src/time/zoneinfo_read.go