IANA Updater Update Time Zones information in Liberica JDK/JRE


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.

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.
  • -z, --tzbundle
    Absolute path to the new timezone data bundle file or URL link to the new IANA timezone data bundle.
    This option is mandatory.
  • -q, --quiet
    Switch to silent mode (do not display any messages).

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} -z tzdata2021a.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 -z tzdata2021a.tar.gz

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

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

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

java -jar IANAUpdater.jar -t ${JAVA_HOME} -z tzdata2021a.tar.gz -q