-
Enhancement
-
Resolution: Fixed
-
P4
-
1.3.0
-
beta
-
generic
-
generic
Name: wl91122 Date: 09/02/99
Currently, TimeZone has only one "getOffset" method:
<pre>
public abstract int getOffset(int era,
int year,
int month,
int day,
int dayOfWeek,
int milliseconds)
</pre>
This method seem to be a source of confusion for numerous developper.
Please see the evaluation for bug #4154652. The evaluator said "This
method should never have been made public". Please see also bug #4228598.
In some situations, we need to know the timezone offset for a given date. But
the current "getOffset" method is not very convenient. I would like to make two
suggestions:
1) Deprecate the current "getOffset(int,int,int,int,int,int)" method.
2) Add a "getOffset(Date)" method.
The new "getOffset(Date)" method would be easier to use, less error-prone, and
coherent with the current "inDaylightTime(Date)" method. If it is ok the use
"inDaylightTime(Date)" with a Date parameter, I don't see why it would not be
ok to give a Date parameter to "getOffset(Date)".
(Review ID: 94783)
======================================================================