For the Maintainers: Update Zoneinfo - libical/libical Wiki

Original URL: https://github.com/libical/libical/wiki/For-the-Maintainers:-Update-Zoneinfo

Intro

This page describes how to use the vzic program to update the libical builtin zoneinfo database.

Preparations

  1. clone vzic some place

     git clone [email protected]:libical/vzic.git
    
  2. Retrieve the most recent tzdata from IANA from http://www.iana.org/time-zones Look for a gzip-compressed tar file (a "tarball") named tzdata2019a.tar.gz, for example. Save the tarball into your Downloads folder.

  3. Uncompress and untar the "tarball" file into the vzic folder:

     % cd vzic
     % mkdir tzdata2019a
     % cd tzdata2019a; tar xvfz ~/Downloads/tzdata2019a.tar.gz; cd ..
    

Building vzic

  1. cd vzic
  2. make -B OLSON_DIR=tzdata2019a

pass PRODUCT_ID and TZID_PREFIX as necessary (shouldn't) or you could edit the top-level Makefile

Running vzic

Run ./vzic

The output is placed in the zoneinfo subdirectory by default, but you can use the --output-dir options to set another toplevel output directory.

You'll probably see some warning messages but not sure what to do about those.

Merging Changes to the Master Set of VTIMEZONES

  1. Run ./vzic-merge.pl --master-zoneinfo-dir=/home/allen/projects/libical/libical/zoneinfo --new-zoneinfo-dir=/home/allen/projects/libical/vzic/zoneinfo

  2. You must add the new timezones in the zones.tab file by hand.

    cd to the libical git repo (eg. /home/allen/projects/libical/libical/zoneinfo) run git status# look for new .ics files to be added

  3. diff the new from vzic/zoneinfo/zones.tab versus the updated zones.tab in the libical git repo

    copy lines from the new vzic/zoneinfo/zones.tab that are new (or differ) from the git repo version

Testing

  1. run 'make test-vzic' and then run ./test-vzic (make sure libical is installed to /usr/local)
  2. run the libical test-suite (./scripts/buildtests.sh)