JDK-6380023 : (tz) API: some TimeZone methods can't deal with GMT offset and DST rule changes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.0,6
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2006-02-02
  • Updated: 2017-02-10
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
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.

Comments
EVALUATION Need to add time stamp sensitive overloads.
25-12-2006