summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-02-05 22:52:03 -0800
committerIan Lance Taylor <iant@golang.org>2019-02-26 23:10:35 +0000
commit068a832a7e176121a2c0767d55e774f10705c72b (patch)
tree8b0703336552374b918bbe574db49dded7476d15 /lib
parentc1050a8e54e1e1c06aa02ccf2b36c13a95666121 (diff)
downloadgo-git-068a832a7e176121a2c0767d55e774f10705c72b.tar.gz
time: read 64-bit data if available
Also store 64-bit data in lib/time/zoneinfo.zip. The comments argue that we don't need the 64-bit data until 2037 or 2106, but that turns out not to be the case. We also need them for dates before December 13, 1901, which is time.Unix(-0x80000000, 0). Fixes #30099 Change-Id: Ib8c9efb29b7b3c08531ae69912c588209d6320e9 Reviewed-on: https://go-review.googlesource.com/c/161202 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/time/update.bash13
-rw-r--r--lib/time/zoneinfo.zipbin365447 -> 788764 bytes
2 files changed, 0 insertions, 13 deletions
diff --git a/lib/time/update.bash b/lib/time/update.bash
index 8d6785b9af..5dc74f9f0b 100755
--- a/lib/time/update.bash
+++ b/lib/time/update.bash
@@ -21,21 +21,8 @@ curl -L -O https://www.iana.org/time-zones/repository/releases/tzdata$DATA.tar.g
tar xzf tzcode$CODE.tar.gz
tar xzf tzdata$DATA.tar.gz
-# Turn off 64-bit output in time zone files.
-# We don't need those until 2037.
-perl -p -i -e 's/pass <= 2/pass <= 1/' zic.c
-
make CFLAGS=-DSTD_INSPIRED AWK=awk TZDIR=zoneinfo posix_only
-# America/Los_Angeles should not be bigger than 1100 bytes.
-# If it is, we probably failed to disable the 64-bit output, which
-# triples the size of the files.
-size=$(ls -l zoneinfo/America/Los_Angeles | awk '{print $5}')
-if [ $size -gt 1200 ]; then
- echo 'zone file too large; 64-bit edit failed?' >&2
- exit 2
-fi
-
cd zoneinfo
rm -f ../../zoneinfo.zip
zip -0 -r ../../zoneinfo.zip *
diff --git a/lib/time/zoneinfo.zip b/lib/time/zoneinfo.zip
index bacb724322..a79e5d98fd 100644
--- a/lib/time/zoneinfo.zip
+++ b/lib/time/zoneinfo.zip
Binary files differ