TimeZone.getDefault() always returns GMT as current timezone

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1
    • Component/s: core-libs
    • None
    • x86
    • windows_nt

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: