Skip to content

Commit

Permalink
lib/time, time, time/tzdata: use slim tz data format
Browse files Browse the repository at this point in the history
Follow-up for CL 261363 which had to retain the fat tz data format due
to failing test.

The reason for the failed tests was that when caching location data, the
extended time format past the end of zone transitions was not
considered. The respective change was introduced in (*Location).lookup
by CL 215539.

This slims down zoneinfo.zip (and thus also the embedded copy in
time/tzdata) by ~350KB.

Change-Id: I412f79de98ba45358b8696aca784999b3479135e
Reviewed-on: https://go-review.googlesource.com/c/go/+/261877
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>
  • Loading branch information
tklauser committed Oct 14, 2020
1 parent fc3a6f4 commit d83168e
Show file tree
Hide file tree
Showing 5 changed files with 6,883 additions and 12,892 deletions.
2 changes: 1 addition & 1 deletion lib/time/update.bash
Expand Up @@ -21,7 +21,7 @@ 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

make CFLAGS=-DSTD_INSPIRED AWK=awk TZDIR=zoneinfo ZFLAGS="-b fat" posix_only
make CFLAGS=-DSTD_INSPIRED AWK=awk TZDIR=zoneinfo posix_only

cd zoneinfo
rm -f ../../zoneinfo.zip
Expand Down
Binary file modified lib/time/zoneinfo.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/time/tzdata/tzdata.go
Expand Up @@ -10,7 +10,7 @@
// it will use this embedded information.
//
// Importing this package will increase the size of a program by about
// 800 KB.
// 450 KB.
//
// This package should normally be imported by a program's main package,
// not by a library. Libraries normally shouldn't decide whether to
Expand Down

0 comments on commit d83168e

Please sign in to comment.