Insights and updates on Java SE and OpenJDK from the Java Platform Group Product Management Team

  • April 21, 2015

Understanding Time Zone Updater 2.0

Aurelio Garcia-Ribeyro
Director of Product Management

Different places in the world are in different time zones so Java needs to keep track of time zone information.

Such information gets complicated when one considers rules for Daylight Saving Time across regions.  There are some places where Daylight Saving Time changes occur multiple times per year. In Morocco, for example, changes occur in March, and October as well as around Ramadan.  The rules can vary from country to country and in some cases within a country.   These rules are updated from time to time.  In the United States they were last updated in 2007.

In order to allow applications to accurately convert dates and times from one place to the equivalent time at another location Java needs to track all such known changes.

Although there is no international regulatory agency that governs time zone changes, there is a collaborative compilation of time zone data known as the TZ Database or IANA Time Zone Database.  This database not only contains past rules but –where available- rules for future changes. 

IANA updates their database several times a year, as time zone information changes.

Since 2002 the JRE relies on this database for the accuracy of its time conversion routines.

The vast majority of Java users get updates to their JRE’s time-zone information as part of the regular Java updates.  There are two cases however, when this is not possible:

  1. Although most governments announce changes in their time zone rules with enough warning to avoid disruptions, sometimes changes to the time zone rules are not announced in time for a new version of the IANA database to be included in an update of the JRE before the change takes effect.
  2. In some cases it is preferable to update just the time-zone information, without changing the JRE.

For both of these cases Oracle provides a tool called TZUpdater

Starting with TZUpdater 2.0 the tool contacts the IANA servers directly and downloads the most up-to-date time zone information.   With this new functionality administrators can use the same tool for all JRE time zone information updates.

To ensure that the Time Zone Database downloaded has not been damaged in transit the tool compares it against a known checksum.

The readme contains instructions on how to use the tool by downloading the IANA time zone database to a local directory for cases on which the computer that needs to be updated cannot reach the IANA servers directly.

This tool updates only the time zone information in the JRE.   Most modern operating systems will update their own time-zone information as part of their regular updates. 

  • On what JRE/JDK versions does this tool work?
    TZUpdater 2.0 works with Oracle’s JRE/JDK versions 5.0 (1.5) and above.   For Java versions provided by other vendors please contact the vendor.
  • My country/city/region is about to go through a change in the daylight saving rules.  When can you have a new version of the tool with the new rules available?
    Please visit http://www.iana.org/time-zones and follow their instructions under Submission/Discussions to request updates to the Time Zone Database.
    Once an update to the IANA Database becomes available you can use TZUpdater 2.0 to apply the changes.
  • Which time zone database is on JRE version <xyz>?
    You can find which version of the IANA database was originally included in a particular JRE in this page: http://www.oracle.com/technetwork/java/javase/tzdata-versions-138805.html
  • Will you continue posting new versions of TZUpdater?
    TZUpdater 2.0 tool can download updates directly from IANA.  Updates may  still be provided as part of regular software maintenance.

To learn more: Timezones, Daylight Savings, and the TZupdater for the Java Runtime Environment (JRE)

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.