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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.0, 6
    • core-libs
    • None
    • Fix Understood
    • 1.1
    • generic, x86
    • generic, windows_xp

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: