United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...

Timezones and the Java Runtime Environment: Frequently Asked Questions

By the Java SE Platform Support Team, March 2008  
 
Contents
  1. Why do I need to care about timezone data?
     
    Timezone data changes frequently. This is reflected in the rate of change to the Olson Timezone Database and the numbering per year of multiple changes, for example 2007a, b, c, ..., g.
     
  2. Why does timezone data change?
     
    Timezone settings are adopted locally, and there is no world timezone authority. In North America, timezone adoption occurs at the city or county level. A wide variety of local concerns can drive a municipality to alter their timezone:
    • Large municipal events: For example, the 2006 Commonwealth Games in Sydney.
    • Voting: For example, Brazil altered their setting for national elections one year.
    • Religion: For example, the Egyptian time setting is changing for Ramadan in 2007.
     
  3. Where does one find information about timezones worldwide?
     
    There is no worldwide timezone data authority, however, the Olson Timezone Database seems to be a point of IT convention. Paul Eggert coordinates the collection of timezone change information and codifies it into the Olson Timezone Database. Paul maintains the Sources for Timezone and Daylight Saving Time Data web site to disperse this timezone information.
     
  4. What exactly is the Olson Timezone Database?
     
    The Olson Timezone Database is the nearest thing there is to an internationally agreed standard for timezones. For more information about the Olson Timezone Database, see this Wikipedia entry.
     
  5. Which JRE version updates include which versions of the Olson timezone data?
     
    The versions of the Olson timezone data that are contained in the different JRE version updates are listed on the page Timezone Data Versions in the JRE Software.
     
  6. What are the differences between, for example, "Olson tzdata2005n" and "Olson tzdata2006p"?
     
    The different Olson timezone data releases reflect changes in timezone rules that have been applied in different places in the world. Major changes in timezone rules in a particular Olson timezone data release are described in the page Timezone Data Versions in the JRE Software.
     
  7. Can I still use the deprecated three-letter timezone IDs "EST", "HST", and "MST" for Eastern, Hawaii, and Mountain summer time?
     
    No, this can lead to incompatibilities. You should use the new format of timezone ID, for example, "America/New_York." See Background on Sun Alert 102836 for more details.
     
  8. What is the minimum version of the Java platform that I need for my country?
     
    If your international timestamp calculations are important for your applications, then you need to keep your JRE software updated with the most up-to-date timezone rules. To do this, you should upgrade to the latest update release of the JRE software and, if necessary, run the TZUpdater tool.
     
  9. Where do I find information about how the 2007 US timezone changes affect all of Sun's products, including hardware as well as software?
     
    See the DST page on the BigAdmin System Administration Portal. For information about how the 2007 US timezone changes affect the Java SE platform running on the Solaris OS, see Overview and Mitigation of the USA2007DST Issue for the Java SE Platform and Solaris OS.
     
  10. Do my operating system's timezone patches fix the Java platform's timezone data?
     
    No. The Java SE platform's timezone data is not read from the local or host operating system. The Java SE platform maintains a private repository of timezone data in locally installed files ( .../jre/lib/zi) as part of the Java Runtime Environment (JRE) software. Applying whatever operating system timezone patches (for example Solaris OS, Linux, Windows) will have no effect on the accuracy of the Java SE platform's timezone data.
     
  11. What happens if I cannot upgrade to a current JRE or JDK version?
     
    If for any reason it is impossible for you to upgrade your JRE or JDK software to the latest update versions, Sun has produced a tool for updating timezone data in installed JRE or JDK software images. This is called the Timezone Updater tool, or TZUpdater, it can be downloaded for free, and applied to versions 1.4.x and later of the Java SE platform.
     
    NOTE: A version of the TZUpdater tool for JDK/JRE version 1.3.1 is also available to customers who have subscribed to a support contract. Customers with support contracts can download the version of TZUpdater for JDK/JRE version 1.3.1 from the SunSolve Support Solution site. The version of TZUpdater for JDK/JRE version 1.3.1 supports Windows platforms and the Solaris operating system.
     
  12. What is the TZUpdater tool?
     
    TZUpdater is a standalone tool that updates older installed JRE implementations with the most recent timezone data. For more information see Timezone Data and the Java Runtime Environment and the TZUpdater README.
     
  13. Where can I get the TZUpdater tool?
     
    The free TZUpdater tool for JDK/JRE versions 1.4.x and later is available now as a free download. Customers with support contracts can download the version of TZUpdater for JDK/JRE version 1.3.1 from the SunSolve Support Solution site. The version of TZUpdater for JDK/JRE version 1.3.1 supports Windows platforms and the Solaris operating system.
     
  14. Do I need to restart instances of the JRE to pick up new timezone data?
     
    Yes. Before running the TZupdater tool to update timezone data, you should stop all the relevant instances of the JRE software. Cached instances of timezone data might exist in running JRE software processes if you do not shut down the JRE software before running the tool.
     
    Restart the JRE software after the TZupdater tool has completed its work.
     
  15. After running TZUpdater, how do I know that my JRE software has been updated correctly?
     
    The TZUpdater tool automatically runs tests on the JRE software after the update is complete, to verify whether the update was successful. You can check success again by running TZUpdater with the -t flag. When using the TZUpdater131 tool (for J2SE 1.3.1_x update releases), you must run the test program after the update is complete. Run the following command:
    java -jar tzupdater131.jar -t
    
     
    To verify whether or not an update was successful without using the TZUpdater tool, Sun has provided a simple application that tests your JRE software's timezone data. To test your JRE software, follow the steps below:
     
    1. Download the DSTTest.java application.
    2. Compile the application.
    3. Run the application, providing a date and time that falls after the date of the time change, for example:
      java DSTTest "11/04/07 3:00 AM"
     
    The application will inform you whether or not your JRE software will be running in daylight saving time at that time.
     
  16. What are the limitations of the TZUpdater tool?
     
    Technical limitations prohibit the application of the free TZUpdater tool to version 1.3.x or earlier of the Java platform. Customers with support contracts can download a version of TZUpdater for JDK/JRE 1.3.1 from the SunSolve Support Solution site. The version of TZUpdater for JDK/JRE version 1.3.1 supports Windows platforms and the Solaris operating system.
     
  17. What should I do if I am running version 1.3.x of the Java platform and I cannot upgrade to a later release?
     
    Customers who are running the JRE or JDK version 1.3.x and who have subscribed to a Sun support contract, can obtain a specialized version of the TZUpdater tool from from the SunSolve Support Solution site.
     
For More Information

Timezone information specific to the Java platform:

The following external links provide general information about timezones and DST:

Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments: