Duplicate :
|
|
Relates :
|
|
Relates :
|
Name: krT82822 Date: 06/05/99 [Note: This issue is touched upon in bug #'s 4225280 (re. British Summer Time still not working) and 4242143 (re. Java's interaction with the "use Daylight Savings" setting in NT date/time controls panel), and is mentioned in RFE # 4228603 (re. better handling of default timezones). Believe this is a bug, not an RFE (and an RFE is the only place I could find us directly addressing this issue). It's not clear what the latest proposed solution to this problem is. One challenge appears to be that of treating London/Europe as a distinct timezone (which HAPPENS to match GMT part of the year, and is GMT+1 during British Summer Time) vs. treating it as GMT + {0 or 1}. Am filing a new bug on this. --kevin.ryan@eng, 5 June 99 -------- user's summary: ---------------------------------- Since installing SP4, Java picks GMT as my time zone instead of the correct "Europe/London" zone. Presumably you just compare the text description provided by NT with an internal table. It would be better to use the numeric definition of the time zone provided by Win32 when you can't find an exact match for the name. import java.util.TimeZone; class ShowTimeZone { public static void main(String[] args) { System.out.print("Default time zone: "); System.out.print(TimeZone.getDefault()); } } D:\Optrak4\test\misc>java ShowTimeZone Default time zone: java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,u seDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek= 0,startTime=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0] D:\Optrak4\test\misc>java -version java version "1.2.2" HotSpot VM (1.0fcs, mixed mode, build E) (Review ID: 83982) ======================================================================