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

(tz) Australia is extending Daylight Saving Time for one week in 2006 only.

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.4.2_10"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      Normally, Australian time zones that use Daylight Saving Time (DST) finish DST on the last Sunday of March.
      Because of a special Event (Commonwealth Games), this has been extended by one week in 2006 to 2nd April 2006.
      Following years will revert to the normal rule.
      Currently J2SE 1.4.2 is not aware of this exception.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      TimeZone timeZone = TimeZone.getTimeZone("Australia/NSW");
      // Create a DateFormat for the given TimeZone
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
      dateFormat.setTimeZone(timeZone);
      try {
      System.out.println(timeZone.inDaylightTime(dateFormat.parse("1/4/2006")));
      } catch (ParseException e) {
      // unexpected
      e.printStackTrace();
      }



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      TimeZone timeZone = TimeZone.getTimeZone("Australia/NSW");
      // Create a DateFormat for the given TimeZone
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
      dateFormat.setTimeZone(timeZone);
      try {
      System.out.println(timeZone.inDaylightTime(dateFormat.parse("1/4/2006")));
      } catch (ParseException e) {
      // unexpected
      e.printStackTrace();
      }

      ---------- END SOURCE ----------

            okutsu Masayoshi Okutsu
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: