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

(tz) API: some TimeZone methods can't deal with GMT offset and DST rule changes

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 1.4.0, 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Understanding:
      Fix Understood
    • Introduced In Version:
      1.1
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Description

      TimeZone has methods that assume the GMT offset of a time zone would never change. However, it does change in the real world. That assumption causes problems especially with future changes. Those methods are:

      getRawOffset()
      getAvailableIds(int)

      We need overloads that take a time stamp as:

      getRawOffset(long)
      getAvailableIds(int, long)

      Note that Calendar.get(Calendar.ZONE_OFFSET) returns the correct GMT offset at the time represented by the Calendar instance.
      getDSTSavings() has the same problem.
      useDaylightTime() has the same problem.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                naoto Naoto Sato
                Reporter:
                okutsu Masayoshi Okutsu
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: