-
Bug
-
Resolution: Fixed
-
P2
-
1.3.1_08, 1.3.1_21
-
b02
-
x86
-
windows_2000, windows_2003
Customer Problem Description:
-----------------------------
FULL PRODUCT VERSION :
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03) Java
HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If I initiate a GregorianCalendar to the time at DST
boundery I got a different output with JDK 1.3.1 and 1.4.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just run this small programm with JDK 1.4 and then with
1.3.1
EXPECTED VERSUS ACTUAL BEHAVIOR :
JDK version utc time
1.4.0_01 returns 1017539999000 (Sun Mar 31,2002 3:59:59
Europe/Berlin)
1.3.1 returns 1017536399000 (Sun Mar 31,2002 1:59:59
Europe/Berlin)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
// DST switch on 31 March 2002 at 2:00:00
//
// |-------|-------X-------|-------|
// 12:00 01:00 03:00 04:00 5:00
// ^
// |
// daylight switch from 2:00 to 3:00 by Europe/Berlin
Calendar cal = new GregorianCalendar(2002, Calendar.MARCH, 31, 2, 59, 59);
cal.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
long time = cal.getTime().getTime();
System.out.println(time);
How to reproduce it:
// DST switch on 31 March 2002 at 2:00:00 by Europe/Berlin
//
// |-------|-------X-------|-------|
// 12:00 01:00 03:00 04:00 5:00
// ^
// |
// daylight switch from 2:00 to 3:00
To reproduce you have just to run this with JDK 1.3.1 and JDK 1.4 to see the
difference:
Calendar cal = new GregorianCalendar(2002, Calendar.MARCH, 31, 2, 59, 59);
cal.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
long time = cal.getTime().getTime();
System.out.println(time);
JDK version utc time in ms
1.4.0_01 1017539999000 (Sun Mar 31, 2002 3:59:59 Europe/Berlin)
1.3.1 1017536399000 (Sun Mar 31, 2002 1:59:59 Europe/Berlin)
-----------------------------
FULL PRODUCT VERSION :
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03) Java
HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If I initiate a GregorianCalendar to the time at DST
boundery I got a different output with JDK 1.3.1 and 1.4.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just run this small programm with JDK 1.4 and then with
1.3.1
EXPECTED VERSUS ACTUAL BEHAVIOR :
JDK version utc time
1.4.0_01 returns 1017539999000 (Sun Mar 31,2002 3:59:59
Europe/Berlin)
1.3.1 returns 1017536399000 (Sun Mar 31,2002 1:59:59
Europe/Berlin)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
// DST switch on 31 March 2002 at 2:00:00
//
// |-------|-------X-------|-------|
// 12:00 01:00 03:00 04:00 5:00
// ^
// |
// daylight switch from 2:00 to 3:00 by Europe/Berlin
Calendar cal = new GregorianCalendar(2002, Calendar.MARCH, 31, 2, 59, 59);
cal.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
long time = cal.getTime().getTime();
System.out.println(time);
How to reproduce it:
// DST switch on 31 March 2002 at 2:00:00 by Europe/Berlin
//
// |-------|-------X-------|-------|
// 12:00 01:00 03:00 04:00 5:00
// ^
// |
// daylight switch from 2:00 to 3:00
To reproduce you have just to run this with JDK 1.3.1 and JDK 1.4 to see the
difference:
Calendar cal = new GregorianCalendar(2002, Calendar.MARCH, 31, 2, 59, 59);
cal.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
long time = cal.getTime().getTime();
System.out.println(time);
JDK version utc time in ms
1.4.0_01 1017539999000 (Sun Mar 31, 2002 3:59:59 Europe/Berlin)
1.3.1 1017536399000 (Sun Mar 31, 2002 1:59:59 Europe/Berlin)
- duplicates
-
JDK-6633085 (tz) The first hour after DST in Brazil for Fall 2007 is reported as 11:00 pm on the previous day
- Closed
- relates to
-
JDK-4312621 (cal) API: DST transition handling is ambiguous in GregorianCalendar
- Open
-
JDK-4230123 TimeZones loaded unnecessarily
- Resolved
-
JDK-6433179 (tz) Incorrect DST end for America/Winnipeg and Canada/Central in 2038+
- Closed
-
JDK-6772689 java.sql.Date.valueOf("2042-10-xx").toString() wrong in some time zones
- Closed