2 # Copyright 2012 The Go Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file.
6 # This script rebuilds the time zone files using files
7 # downloaded from the ICANN/IANA distribution.
8 # Consult https://www.iana.org/time-zones for the latest versions.
19 curl -L -O https://www.iana.org/time-zones/repository/releases/tzcode$CODE.tar.gz
20 curl -L -O https://www.iana.org/time-zones/repository/releases/tzdata$DATA.tar.gz
21 tar xzf tzcode$CODE.tar.gz
22 tar xzf tzdata$DATA.tar.gz
24 make CFLAGS=-DSTD_INSPIRED AWK=awk TZDIR=zoneinfo posix_only
27 rm -f ../../zoneinfo.zip
28 zip -0 -r ../../zoneinfo.zip *
31 go generate time/tzdata
34 if [ "$1" = "-work" ]; then
35 echo Left workspace behind in work/.
39 echo New time zone files in zoneinfo.zip.