JDK-4080294 : SimpleDateFormat improperly formats Arizona time (AZ does not obs. DST)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.1.4
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1997-09-18
  • Updated: 1997-10-23
  • Resolved: 1997-10-23
Related Reports
Duplicate :  
Description

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 - ###@###.###
======================================================================

Comments
WORK AROUND Name: tb29552 Date: 09/18/97 ======================================================================
11-06-2004