Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-rc-2
Description
TimeCategory#getTimeZone(Date) pretends to return a TimeZone that would be somehow associated with the given Date.
- A java.util.Date does not carry any time zone information as long as it's deprecated functionality is not used an it's toString() method is not called.
- A java.util.Calendar's time zone is not affected by calling #setTime(Date).
So the current implementation of TimeCategory#getTimeZone(Date) is effectively equivalent to
public static TimeZone getTimeZone(Date self) { return TimeZone.getDefault(); }
The result does not depend on the passed Date, and the method should probably be deprecated.