-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.2
-
x86
-
windows_xp
FULL PRODUCT VERSION :
j2sdk1.4.2_13 installation package
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP Professional. 5.1.2600 SP2 build 2600
A DESCRIPTION OF THE PROBLEM :
TimeZone object has not information about Day Light saving transitions when created with EST timezone. It is working fine for "PST" timezone.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
TimeZone tz = TimeZone.getTimeZone("EST");
Then see the value of tz.transitions,
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Non zero array with 235 elements
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main (String[] param) {
long tickStart = Calendar.getInstance().getTimeInMillis();
TimeZone tz = TimeZone.getTimeZone("EST");
Calendar cal = Calendar.getInstance(tz);
DateFormat df = DateFormat.getInstance();
df.setCalendar(cal);
cal.set(Calendar.YEAR, 2007);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
cal.set(Calendar.DAY_OF_WEEK_IN_MONTH, 2);
cal.set(Calendar.HOUR_OF_DAY, 1);
cal.set(Calendar.MINUTE, 1);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
for (int inc=0; inc < 10; inc++) {
cal.add(Calendar.MINUTE, 15);
Date currD = cal.getTime();
System.out.println ("Date=" + df.format(currD));
}
long tickEnd = Calendar.getInstance().getTimeInMillis();
System.out.println("Time elapsed is " + (tickEnd - tickStart));
}
---------- END SOURCE ----------
j2sdk1.4.2_13 installation package
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP Professional. 5.1.2600 SP2 build 2600
A DESCRIPTION OF THE PROBLEM :
TimeZone object has not information about Day Light saving transitions when created with EST timezone. It is working fine for "PST" timezone.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
TimeZone tz = TimeZone.getTimeZone("EST");
Then see the value of tz.transitions,
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Non zero array with 235 elements
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main (String[] param) {
long tickStart = Calendar.getInstance().getTimeInMillis();
TimeZone tz = TimeZone.getTimeZone("EST");
Calendar cal = Calendar.getInstance(tz);
DateFormat df = DateFormat.getInstance();
df.setCalendar(cal);
cal.set(Calendar.YEAR, 2007);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
cal.set(Calendar.DAY_OF_WEEK_IN_MONTH, 2);
cal.set(Calendar.HOUR_OF_DAY, 1);
cal.set(Calendar.MINUTE, 1);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
for (int inc=0; inc < 10; inc++) {
cal.add(Calendar.MINUTE, 15);
Date currD = cal.getTime();
System.out.println ("Date=" + df.format(currD));
}
long tickEnd = Calendar.getInstance().getTimeInMillis();
System.out.println("Time elapsed is " + (tickEnd - tickStart));
}
---------- END SOURCE ----------
- duplicates
-
JDK-6466476 (tz) Introduction of tzdata2005r can introduce incompatility issues with some JDK1.1 3-letter TZ Ids
- Closed