Java Platform and Applications Experts

IANA Updater

IANA Updater


IANAUpdater is tool that can be used to update Time Zones information in Liberica JDK/JRE and, possilby, other OpenJDK-based distributions. Liberica JDK includes special timezone data file tzdb.dat, which contains important information about local time options/properties, in particular, UTC offsets and daylight saving time (DST) changes in different countries. This info is changed from time to time and thus such data in Liberica JDK may become obsolete before a new update release of Liberica JDK is out. Internet Assigned Numbers Authoriry IANA, IANA Time Zones provides the Time Zone Database containing data that represent the history of local time for many representative locations around the globe. IANAUpdater allows to read timezone data from IANA Time Zone Database and convert it into binary format of the file tzdb.dat used in Liberica JDK.

If any error happens during handling of IANA timezone data file, it’s recommended to use the alternative Time Zone Database.

Downloads

Please download IANAUpdater here: IANAupdater.jar

Usage

Run the IANAUpdater tool with the following command:

java -jar IANAUpdater.jar [-options]

If no option is provided, help-text will be displayed.

Available options include:

  • -t, –target
    Path to Liberica runtime base installation directory which contains file tzdb.dat in one of its subdirectories, or the absolute path to tzdb.dat file.
    This option is mandatory.
  • -f, --tzfile
    Absolute path to the new timezone data bundle file.
  • -u, --tzurl
    URL link to the new IANA timezone data bundle.
  • -q, --quiet
    Switch to silent mode (do not display any messages).

Either option -f or the option -u has to be provided.

Examples

Update Liberica JDK which can be found in ${JAVA_HOME} with time zone data provided in a file:

java -jar IANAUpdater.jar -t ${JAVA_HOME} -f tzdata2018i.tar.gz

Update Liberica JDK tzdb.dat with time zone data provided in a file:

java -jar IANAUpdater.jar -t ${JAVA_HOME}/jre/lib/tzdb.dat -f tzdata2018e.tar.gz

Update Liberica JDK tzdb.dat with time zone data from web URL:

java -jar IANAUpdater.jar -t ${JAVA_HOME} -u https://data.iana.org/time-zones/releases/tzdata2018i.tar.gz

or

java -jar IANAUpdater.jar -t ${JAVA_HOME} -u https://web.cs.ucla.edu/~eggert/tz/release/2018g/tzdata2018g-rearguard.tar.gz

Quietly update Liberica JDK tzdb.dat with time zone data provided in a file:

java -jar IANAUpdater.jar -t ${JAVA_HOME} -f tzdata2018i.tar.gz -q