• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

zoneinfo/23-Nov-2023-660658

README.zoneinfoD23-Nov-20231.3 KiB3832

versionD23-Nov-20236 21

README.zoneinfo

1testdata/zoneinfo contains time-zone data files that may be used with CCTZ.
2Install them in a location referenced by the ${TZDIR} environment variable.
3Symbolic and hard links have been eliminated for portability.
4
5On Linux systems the distribution's versions of these files can probably
6already be found in the default ${TZDIR} location, /usr/share/zoneinfo.
7
8New versions can be generated using the following shell script.
9
10  #!/bin/sh -
11  set -e
12  DESTDIR=$(mktemp -d)
13  trap "rm -fr ${DESTDIR}" 0 2 15
14  (
15    cd ${DESTDIR}
16    git clone https://github.com/eggert/tz.git
17    make --directory=tz \
18        install DESTDIR=${DESTDIR} \
19                DATAFORM=vanguard \
20                TZDIR=/zoneinfo \
21                REDO=posix_only \
22                LOCALTIME=Factory \
23                TZDATA_TEXT= \
24                ZONETABLES=zone1970.tab
25    tar --create --dereference --hard-dereference --file tzfile.tar \
26        --directory=tz tzfile.h
27    tar --create --dereference --hard-dereference --file zoneinfo.tar \
28        --exclude=zoneinfo/posixrules zoneinfo \
29        --directory=tz version
30  )
31  tar --extract --directory src --file ${DESTDIR}/tzfile.tar
32  tar --extract --directory testdata --file ${DESTDIR}/zoneinfo.tar
33  exit 0
34
35To run the CCTZ tests using the testdata/zoneinfo files, execute:
36
37  bazel test --test_env=TZDIR=${PWD}/testdata/zoneinfo ...
38