Skip to content

Instantly share code, notes, and snippets.

@jeremywall
Last active August 9, 2023 08:09

Revisions

  1. jeremywall revised this gist Aug 31, 2022. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions readme.txt
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,11 @@
    # These instructions have been updated to no longer rely on lzip since it's not available out of
    # the box in many environments.

    # SHORTCUT ALERT: If you don't want to go through the whole process to build the rearguard tarball
    # or use the ziupdater tool to generate and install a tzdb.dat file you can always just download
    # the latest tar.gz and tzdb.dat files from a repo I created that automatically builds new TZDB
    # releases as they come out. This repo is at https://github.com/jeremywall/tzdb-builder/releases

    # make a new working directory first
    mkdir tzdb
    cd tzdb
  2. jeremywall revised this gist Aug 31, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions readme.txt
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,7 @@ sudo java -jar ziupdater-x.y.z.jar -l file:///home/username/path/to/tzdataVERSIO
    # correct the permission of the tzdb file that was installed
    # for oracle java 8 it's at /usr/lib/jvm/java-8-oracle/jre/lib/tzdb.dat
    # for corretto java 8 it's at /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/tzdb.dat
    # for corretto java 11 it's at /usr/lib/jvm/java-11-amazon-corretto/lib/tzdb.dat
    sudo chmod 644 /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/tzdb.dat

    # start java processes
  3. jeremywall revised this gist May 25, 2022. 1 changed file with 18 additions and 11 deletions.
    29 changes: 18 additions & 11 deletions readme.txt
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,21 @@
    # download the latest tzdb
    wget https://data.iana.org/time-zones/tzdb-latest.tar.lz

    # decompress
    lzip -d tzdb-latest.tar.lz

    # untar
    tar xvf tzdb-latest.tar

    # change dir where VERSION is the version number
    cd tzdb-VERSION
    # I recently had to try to update the TZDB of a JDK installation where I could not install lzip
    # from any registered package repository and trying to compile lzip from source was failing.
    # I discovered that as an alternative to using the tzdb-latest.tar.lz file I could just use both
    # the tzcode-latest.tar.gz and the tzdata-latest.tar.gz to generate the needed rearguard tarballs.
    # These instructions have been updated to no longer rely on lzip since it's not available out of
    # the box in many environments.

    # make a new working directory first
    mkdir tzdb
    cd tzdb

    # download the latest tzcode and tzdata archives
    wget https://data.iana.org/time-zones/tzcode-latest.tar.gz
    wget https://data.iana.org/time-zones/tzdata-latest.tar.gz

    # decompress the archives into the current directory
    tar xzfv tzcode-latest.tar.gz
    tar xzfv tzdata-latest.tar.gz

    # make the rearguard version, the result output file will be tzdataVERSION-rearguard.tar.gz where VERSION is the version number
    make rearguard_tarballs
  4. jeremywall revised this gist Oct 19, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.txt
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,8 @@ sudo java -jar ziupdater-x.y.z.jar -l file:///home/username/path/to/tzdataVERSIO

    # correct the permission of the tzdb file that was installed
    # for oracle java 8 it's at /usr/lib/jvm/java-8-oracle/jre/lib/tzdb.dat
    sudo chmod 644 /usr/lib/jvm/java-8-oracle/jre/lib/tzdb.dat
    # for corretto java 8 it's at /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/tzdb.dat
    sudo chmod 644 /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/tzdb.dat

    # start java processes

  5. jeremywall revised this gist Jan 16, 2020. No changes.
  6. jeremywall created this gist Jan 16, 2020.
    28 changes: 28 additions & 0 deletions readme.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    # download the latest tzdb
    wget https://data.iana.org/time-zones/tzdb-latest.tar.lz

    # decompress
    lzip -d tzdb-latest.tar.lz

    # untar
    tar xvf tzdb-latest.tar

    # change dir where VERSION is the version number
    cd tzdb-VERSION

    # make the rearguard version, the result output file will be tzdataVERSION-rearguard.tar.gz where VERSION is the version number
    make rearguard_tarballs

    # get the ziupdater tool from https://www.azul.com/products/open-source-tools/ziupdater-time-zone-tool/
    # place the ziupdater-x.y.z.jar and the tzdataVERSION-rearguard.tar.gz on the machine you want to update
    # stop Java processes
    # run the ziupdater
    sudo java -jar ziupdater-x.y.z.jar -l file:///home/username/path/to/tzdataVERSION-rearguard.tar.gz

    # correct the permission of the tzdb file that was installed
    # for oracle java 8 it's at /usr/lib/jvm/java-8-oracle/jre/lib/tzdb.dat
    sudo chmod 644 /usr/lib/jvm/java-8-oracle/jre/lib/tzdb.dat

    # start java processes