How do I update the timezone information for the OpenJDK?

后端 未结 1 1049
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 17:53

How do I update the timezone information for the OpenJDK? Oracle puts out tzupdater but that is bound by their license so I don\'t want to use it. I\'m looking for an open s

1条回答
  •  心在旅途
    2020-12-03 18:10

    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.

    0 讨论(0)
提交回复
热议问题