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

Win32: Wrong default timezone in Melbourne Australia

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.7, 1.2.0
    • core-libs



      Name: gsC80088 Date: 02/04/99


      new Date() is out by 1 hour because of a DST error.

      I'm running in Melbourne, Australia. Melbourne has the same
      DST rules as Sydney, Australia. These are different from those
      for Brisbane, Australia: Brisbane doesn't have DST;
      Melbourne and Sydney do.

      My NT timezone is set to GMT+10 (Australia/Brisbane+Sydney+Melbourne).

      The following program demonstrates that user.timezone is being
      set to Australia/Brisbane instead of Australia/Sydney, which means
      that new Date() is out by 1 hour - it's not DST-adjusted and it
      should be.

      This used to work in JDK 1.1 because all of eastern Australia
      was in AET. This of course was wrong for Brisbane!

      public class Timezone
      {
       public static void main(String[] args)
       {
        System.out.println("user.timezone="+System.getProperties().getProperty("user.timezone"));
       }
      }

      Output:

      user.timezone=Australia/Brisbane

      As Melbourne and Sydney are the two biggest cities and are
      in the two most populous states (Victoria and NSW respectively),
      the JDK 1.1 error was marginally preferable to the JDK 1.2 error.
      (Review ID: 48539)
      ======================================================================

            ktakahassunw Koushi Takahashi (Inactive)
            gstone Greg Stone
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: