|
Quick Lists
|
|
Bug ID:
|
4505478
|
|
Votes
|
0
|
|
Synopsis
|
Incorrect Daylight Savings for JDK 1.2 and JDK 1.3
|
|
Category
|
java:classes_util_i18n
|
|
Reported Against
|
1.2.2
|
|
Release Fixed
|
|
|
State
|
11-Closed, duplicate of 4257314,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
4177570
,
4230123
,
4257314
,
4915941
|
|
Submit Date
|
21-SEP-2001
|
|
Description
|
The following JDKs will display the wrong DST for Australia/Sydney timezone:
java 1.3.0 incorrect
java 1.2.2_09 incorrect
java 1.2.2_08 incorrect
java 1.2.2_07a incorrect
java 1.2.2_06 incorrect
My test program is below:
import java.util.*;
public class LocalTime{
public static void main(String args[]){
Calendar c = Calendar.getInstance();
String des, delim = "[],";
StringTokenizer destok;
System.out.println(new Date().toString());
des = c.toString();
destok = new StringTokenizer(des, delim);
System.out.println("System default calendar settings:");
while (destok.hasMoreTokens())
System.out.println(" " + destok.nextToken());
}
}
Test Cases:
After running the program, the differences in the output from JDK 1.3.1, 1.2.2.07a, and 1.2.2.06 are:
startMonth=9 jdk 1.3.1
startMonth=7 jdk 1.2.2.07a and 1.2.2.06
startTimeMode=1 jdk 1.3.1
no such attr jdk 1.2.2.07a and 1.2.2.06
endTime=7200000 jdk 1.3.1
endTime=10800000 jdk 1.2.2.07a and 1.2.2.06
endTimeMode=1 jdk 1.3.1
no such attr jdk 1.2.2.07a and 1.2.2.06
HOUR=6,HOUR_OF_DAY=18 jdk 1.3.1
HOUR=7,HOUR_OF_DAY=19 jdk 1.2.2.07a and 1.2.2.06
DST_OFFSET=0 jdk 1.3.1
DST_OFFSET=3600000 jdk 1.2.2.07a and 1.2.2.06
|
|
Work Around
|
Programming workaround such as manually setting the hour of the day in your Calendar instance.
OR
Use either JDK 1.2.2.05a or JDK 1.3.1
|
|
Evaluation
|
SimpleTimeZone can represent DST schedules as a single set of start and end rules DST. Some time zones, such as some of the Australia time zones in 2000, change their DST schedules, which can't be addressed by SimpleTimeZone. This problem has been fixed in Merlin Beta. See bug#'s 4230123 and 4257314.
1.3.0 was released in 2000, and therefore, took the 2000 DST rules for all time zones. 1.3.1 was released in 2001 and took the 2001 rules, and so on.
If a fix is required on 1.3.0 and 1.2.2_xx, this bug should be escalated.
xxxxx@xxxxx 2001-09-25
|
|
Comments
|
Submitted On 29-MAR-2004
gcato
Using jdk1.3.1 in timezone ECT. Daylight saving time
switched on Monday March 29 instead of Sunday March 29 2004.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |