How to update time zone information for OpenJDK?

How to update time zone information for OpenJDK? Oracle releases tzupdater, but it is related to their license, so I do not want to use it. I am looking for an open source alternative that will allow me to simply update the time zone information, and not the entire JRE.

+9
java timezone openjdk
source share
1 answer

Azul recently published an open source tool for updating TZ data: https://www.azul.com/products/open-source-tools/ziupdater-time-zone-tool/

It works similarly to Oracle tzupdater, but has an open source license (GPLv2 license).

Usage: apply it to the IANA data package using the Java you want to update:

$JAVA_HOME/bin/java -jar ziupdater.jar -l file://[path]/tzdata.tar.gz 

With this command, you apply the time zone changes to your Java installation.


What does it mean?

Consider the following situation: you installed Java a year ago, and then the government of a certain country changed its laws, for example, abolished DST. Your Java installation does not yet know about this and may not properly handle the time for this particular region. Updating time zone data solves this problem.

+6
source share

All Articles