JDK-4322313 : API:Clarification on custom tz ID in TimeZone and tz formats in SimpleDateFormat
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.2.0,1.3.0,1.3.0_02
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    generic,solaris_2.5,windows_nt,windows_2000 generic,solaris_2.5,windows_nt,windows_2000
  • CPU: generic,x86,sparc
  • Submitted: 2000-03-16
  • Updated: 2001-07-10
  • Resolved: 2001-07-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
TimeZone spec:

    If the time zone you want is not represented by one of the supported IDs, 
    then you can create a custom time zone ID with the following syntax: 

         GMT[+|-]hh[[:]mm]


However, the specified custom ID value is not used for a custom TimeZone object, but "Custom" is always given as its ID. So, there is no way to identify a custom TimeZone object using the custom ID.

Also, the syntax should be:

	GMT{+|-}hh[[:]mm]

'+' or '-' is required after "GMT".


SimpleDateFormat spec:

     For time zones that have no names, use strings GMT+hours:minutes or 
     GMT-hours:minutes.

However, SimpleDateFormat.parse accepts other formats, such as GMT+hhmm, +hhmm (RFC822-style), etc. It needs to clarify the spec.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2
14-06-2004

EVALUATION When a custome time is specified, - normalize the specified ID to the GMT{+|-}hh:mm format. - create a TimeZone object with the normalized ID, the specified GMT offset with no daylight saving time rules. "GMT+9" and "GMT+09:00" should be the same time zone. masayoshi.okutsu@Eng 2000-03-16 For SimpleDateFormat, parse should accept: - GMT+hh:mm, GMT-hh:mm where hh is 0-23, mm is 00-59 - The RFC822-style +hhmm and -hhmm where hh is 00-23, mm is 00-59 format() should be able to produce a time zone in the RFC822 time zone format. 'Z' is proposed for the pattern symbol. Digits must be the ASCII digits in both TimeZone and SimpleDateFormat. masayoshi.okutsu@Eng 2001-06-20 All the changes in CCC request were implemented. SimpleDateFormat API doc was also improved. masayoshi.okutsu@Eng 2001-07-04
20-06-2001