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

(tz) Windows XP GMT-12 time zone should be supported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.4.0
    • core-libs

      Name: jl125535 Date: 02/05/2003


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

      Also reproduced with 1.4.1 and 1.4.2.

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      When time zone is set to GMT-12, java.util.Date() returns a
      date greater by one day then the system date

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Set the time zone to GMT-12 (Eniwetok, Kwajelein)
      2. Set the date to Oct-4 2002
      3. Set the time to 7:40am
      4. Start Command Prompt
      5. Check the system date: type "date"
      6. Compile and run the test Java code (below)
      7. The output produced by the Java code is incorrect: while
      the OS reports Oct-4, Java reports Oct-5

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected a date equal to OS date;
      Got a date off by 1 day

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.Date;

      public class Test {
          public static void main(String[] args) {
              Date d = new Date();
              System.out.println(d);
          }
      }

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

      CUSTOMER WORKAROUND :
      With time zone set to GMT-5 (Easter time (US & Canada)) the
      date reported by java.util.Date() matches the OS date
      (Review ID: 165521)
      ======================================================================

            okutsu Masayoshi Okutsu
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: