JDK-5088889 : Date() does not report correct system time
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.3.1_11
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-08-18
  • Updated: 2004-08-19
  • Resolved: 2004-08-19
Related Reports
Duplicate :  
Relates :  
Description
This is a problem easily reproducible in 1.3.1_xx . It is not a problem with 1.4.2 or 1.5

Attached is a simple test case which reproduces the problem.

Before running the test, change the system time settings as follows.
Change the Date to April 4, 2004 and time to 1:58:00 AM ( This is 2 min before we switched over to daylight savings time this year) Set the timezone to Pacific , but UNCHECK the "Automatically adjust clock for daylight savings changes". (as in the attached picture). This is important to reproduce the problem.

Run the attached class.
Now, let the system time change to 2:00am on April 4, then run the test class again. You will see that the system time shows 2:00am, while the test class output shows 3:00am.

It seems that if in the system time setting, you select a timezone that has the checkbox to adjust for daylight savings, the jvm does not recognize the fact that this box is unchecked. Timezones such as Arizona and Indiana which do not even display this checkbox (and do not change for daylight savings) work fine.

Comments
PUBLIC COMMENTS Date adjusts time for Daylight Savings, even when it shouldnt.
20-08-2004

EVALUATION This problem was fixed in 1.4.0 under 4296930. If the same fix is necessary in 1.3.1_xx, please escalate 4296930. ###@###.### 2004-08-19
19-08-2004