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

SimpleDateFormat improperly formats Arizona time (AZ does not obs. DST)

XMLWordPrintable

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



      Name: tb29552 Date: 09/18/97


      The java.text.SimpleDateFormat class does not properly
      format a date/time value for most of Arizona while
      the rest of the country is on daylight savings time.

      There is a special time zone for Arizona, PNT for
      Phoenix Normal Time. (By the way, it's not just Phoenix,
      it's all of Arizona except the Navajo Reservation.)
      This is because Arizona does not observe Daylight
      Savings Time.

      When SimpleDateFormat is asked to format a date/time
      value it uses "getZoneIndex" in java.text.DateFormatSymbols
      to get time zone strings. But this method compares
      the time zone ID it is provided with the third and
      fifth strings of each time zone set. It needs to
      compare to the first. The set of strings for PNT is
      as follows: {"PNT", "Mountain Standard Time", "MST",
      "Mountain Standard Time", "MST", "Phoenix"}. This
      method will never find "PNT".
      company - Cyclone Software Corp. , email - ###@###.###
      ======================================================================

            ssenthilsunw Shanmugam Senthil (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: