Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
While attempting to verify bug: 4300378, I came across the following exception. It starts at Merlin-beta b45. ---------------------------------------------------------- Exception in thread "main" java.lang.ClassCastException: sun.util.calendar.ZoneInfo at GetDSTSavingsTest.<init>(GetDSTSavingsTest.java:8) at GetDSTSavingsTest.main(GetDSTSavingsTest.java:17) ---------------------------------------------------------- The following program reproduces it: ---------------------------------------------------------- import java.util.*; public class GetDSTSavingsTest { SimpleTimeZone stz; public GetDSTSavingsTest() { stz = (SimpleTimeZone)TimeZone.getTimeZone("Asia/Tokyo"); System.out.println("Observes daylight savings time? " + stz.useDaylightTime()); System.out.println("Daylight savings time value(should be 0 if not " + "observed): " + stz.getDSTSavings()); } public static void main(String[] args) { new GetDSTSavingsTest(); } } ---------------------------------------------------------- edmund.lou@eng 2001-01-02 ===================================
|