Australian Time Zone Changes Affect Java Applications

By John O'Conner, March 2006    

Like many countries, Australia observes Daylight Saving Time (DST) or Summer Time as it's called down under. During DST, Australia adjusts its several time zones "forward" by an hour. After DST, the country moves its time zones back by the same amount of time. For example, Sydney's time zone is 10 hours ahead of GMT (GMT+1000). During DST, they adjust the clock forward one hour, making the time zone 11 hours ahead of GMT (GMT+1100).

Time Zone Changes

Occasionally a country will change its zone rules. Australia has changed its rules this year to accommodate the Commonwealth Games. Before the change, DST would have ended on March 26 after 2:59 AM GMT+1100. However, in 2006 only, DST ends on April 2 at the same time.

Incorrect Time

As a result of the DST change, applications using time or time zone functionality in an older Java Runtime Environment (JRE) may report incorrect time between March 26 and April 2 2006. The time zone data in those environments contains outdated DST information for Australia.

Example 1 shows time increments during critical DST transition periods using JRE 1.5.0 Update 4 in the Australia/Sydney time zone. JRE 1.5.0 Update 4 contains outdated time zone information. Notice that this JRE correctly reports a time zone offset GMT+1100 at 2:59 AM on March 26, 2006. However, the next second after 2:59 AM GMT+1100 becomes 2:00 AM GMT+1000. The JRE continues to incorrectly report GMT+1000 throughout the updated DST period that runs through 2:59 AM on April 2 2006.

 

Example 2 shows the same date/time increments produced by JRE 1.5.0 Update 6, which has been updated with new time zone data. Notice that this JRE reports GMT+1100 throughout the extended DST period that runs through 2:59 AM GMT+1100 on April 2.

 
How To Fix the Problem

To correct this problem, affected users should upgrade their version of the JRE. The following JRE versions have the required time zone data updates to provide accurate time for Australian time zones during 2006:

* Note: J2SE 1.3.1 Update 18 will be available on March 22, 2006.

For More Information

Time-Zone Changes for Western Australia Begin December 3, 2006

Time increments near March 26, 2:59 AM GMT+1100 (DST end before change):
2006-03-26 02:58 GMT+1100
2006-03-26 02:59 GMT+1100
2006-03-26 02:00 GMT+1000
2006-03-26 02:01 GMT+1000
2006-03-26 02:02 GMT+1000
...
Time increments near April 2, 2:59 AM GMT+1100 (DST end after change:
2006-04-02 01:58 GMT+1000
2006-04-02 01:59 GMT+1000
2006-04-02 02:00 GMT+1000
2006-04-02 02:01 GMT+1000
2006-04-02 02:02 GMT+1000
Example 1. JRE 1.5 Update 4 reports incorrect time zone offsets during the DST extension.
Time increments near March 26, 2:59 AM GMT+1100 (DST end before change):
2006-03-26 02:58 GMT+1100
2006-03-26 02:59 GMT+1100
2006-03-26 03:00 GMT+1100
2006-03-26 03:01 GMT+1100
2006-03-26 03:02 GMT+1100
...
Time increments near April 2, 2:59 AM GMT+1100 (DST end after change:
2006-04-02 02:58 GMT+1100
2006-04-02 02:59 GMT+1100
2006-04-02 02:00 GMT+1000
2006-04-02 02:01 GMT+1000
2006-04-02 02:02 GMT+1000
Example 2. JRE 1.5 Update 6 reports correct time zone offsets during the DST extension period.
Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.

Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.