2

In OracleJDK, timezone updates are done using Oracle's tzupdater tool. I use OpenJDK (zulu binary offered by Azul) and I want to update its timezone to the latest IANA timezone. What exactly does it mean to update timezone? How can I do it manually? Thanks in advance.

Anjana
  • 873
  • 7
  • 22
  • This has been asked before [here](https://stackoverflow.com/questions/29101788/how-do-i-update-the-timezone-information-for-the-openjdk), but not answered. Unfortunately, I don't have an answer to this either. – Matt Johnson-Pint Jun 04 '17 at 01:05

1 Answers1

5

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

It works similar to Oracle tzupdater, but has open source (GPLv2 License) license.

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

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

By this command you will apply changes to timezone to your Java installation.


What does it mean?

Consider next situation: you installed Java a year ago and later a government of certain country changed their laws, e.g. cancelled DST. Your Java installation doesn't know about that yet and may handle time incorrectly for that particular region. Updating timezone data solves that.

Sergey Grinev
  • 34,078
  • 10
  • 128
  • 141
  • 1
    Thanks @Sergey Grinev. There is also another open source jar that I found here at github: https://github.com/akashche/tzdbgen The tzdb.dat file generated using this can be replaced with the default tzdb.dat present in jdk to update timezone. – Anjana Jun 30 '17 at 11:29