Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4505478

Incorrect Daylight Savings for JDK 1.2 and JDK 1.3

    XMLWordPrintable

    Details

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              okutsu Masayoshi Okutsu
              Reporter:
              jhjohnst Jian Johnston (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: