JDK-6645262 : (tz) Australia/Perth TimeZone useDaylightTime() returns incorrect boolean (False)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-12-25
  • Updated: 2010-07-29
  • Resolved: 2007-12-25
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Windows XP

A DESCRIPTION OF THE PROBLEM :
For the Australia/Perth timezone the useDaylightTime() returns False even though Western Australia(Perth) is currently using DST and has an offset change from +8 to +9.
 Although Western Australia's use of DST is just a trial  until 2009 according to the TimeZone javadocs the useDaylightTime() method "Queries if this time zone uses daylight savings time." Therefore even during their trial of DST this method should return TRUE.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compute offset using Australia/Perth timezone on October 27, 2007 (offset should be +8)
Compute offset using Australia/Perth timezone on October 28, 2007 (offset should be +9)
Call to useDaylightTime() will return FALSE, however based on the different offset mentioned above, this method should return TRUE.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
useDaylightTime() should return TRUE for Australia/Perth timezone.
ACTUAL -
useDaylightTime() returns FALSE

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION It's a known limitation of the method because the method doesn't take any time stamp. And therefore there's no way to determine which period of time the caller wants to check. The API doc has the following. If an underlying TimeZone implementation subclass supports historical Daylight Saving Time schedule changes, the method refers to the latest Daylight Saving Time schedule information. In Australia/Perth, the latest rule is not to observe DST after the current 3-year DST trial. Therefore, the method returns false. I'm closing this CR as a duplicate of 6380023.
25-12-2007