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

TimeZone class thinks Queensland, Australia uses daylight savings.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs
    • None

      The Sun Management Center console uses JDK extensively. When used in the Queensland, Australia time zone, the time values are displayed incorrectly. Apparently the TimeZone class is not aware that this time zone does not use daylight savings (even though every other Australian time zone does). Simple test case below can be used to duplicate the problem (correct time for Queensland should be PST + 18): import java.text.*;
      import java.util.*;
      import java.io.*;

      public class SimpleDateFormatTest {

          public SimpleDateFormatTest() {
          }

          public static void main( String args[]) {
              SimpleDateFormat fm = new SimpleDateFormat("MMM d HH:mm:ss");
              System.out.println(fm.format(new Date()));
          }
      }

            okutsu Masayoshi Okutsu
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: