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

TimeZone.getDefault() always returns GMT as current timezone

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 1.1
    • core-libs
    • None
    • x86
    • windows_nt

    Description

      From: Bjoern-Arne Meyn <###@###.###>

      On my computer running under Windows 95, the default timezone is MET (Middle European Time = GMT + 1 / +2 DST). Java code such as the following should return MET as default timzone and a raw offset of 1 (* 60 * 60 * 1000).

      SimpleTimeZone stz = (SimpleTimeZone)SimpleTimeZone .getDefault();
      System.out.println(stz.getID());
      System.out.println(stz.getRawOffset() / (60 * 60 * 1000));

      The values returned by the code are GMT and 0, no matter what the actual timezone is. If I change the timezone in my system's configuration, to EST for example, Java fails to notice this and still returns the values above.

      Attachments

        Issue Links

          Activity

            People

              ssenthilsunw Shanmugam Senthil (Inactive)
              nlindenbsunw Norbert Lindenberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: