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

wrong time offsets, and short time representation [NT jdk1.2.1's TimeZone]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.2.2
    • core-libs

      The jdk1.2.x's SimpleDateFormat.format() either produces GMT+xx strings instead of
      the expected 3 letter acronyms (short time representation) for specific
      time zones (see table below), and/or displays the wrong times (1 hour offset)
      in several cases.
       



      Procedure to recreate the failures
      ==================================

      1. Change time zone setting in Date/time panel of Windows NT
      2. Note the date and time.
      3. Using java, do a System.out.println(formatter.format(currentTime))
        where formatter is a SimpleDateFormat, and currentTime is a
      Data object.
      4. Compare the date/time/timzone in NT with one reported by Java.




      Results:
      ========

      NT Setting TimeZone reported by Java Java VM time calculation
      ---------------------------- ------------------------- ------------------------
      Greenwich Mean time (GMT) GMT Off by one hour
      Berlin, rome, .. (GMT+1) GMT+02:00 OK
      Paris, Madrid, .. (GMT+1) CEST OK
      Israel (GMT+2) IDT Off by one hour
      Moscow (GMT+3) GMT+04:00 OK
      Adilaide (GMT+9:30) GMT+09:30 OK
      Brisbane, Melbourne (GMT+10) GMT+10:00 OK
      Mexico City (GMT-6) GMT-05:00 Off by one hour

       

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: