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

API:Clarification on custom tz ID in TimeZone and tz formats in SimpleDateFormat

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.2.0, 1.3.0, 1.3.0_02
    • core-libs
    • beta2
    • generic, x86, sparc
    • generic, solaris_2.5, windows_nt, windows_2000

      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.

            okutsu Masayoshi Okutsu
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: