JDK-6609361 : TimeZone object have no information about transitions for EST timezone
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-09-26
  • Updated: 2010-07-29
  • Resolved: 2007-10-19
Related Reports
Duplicate :  
Description
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 ----------

Comments
EVALUATION This is a duplicate of 6466476.
19-10-2007