Re: NSTimeZone returns other DST information than java.util.TimeZone
Re: NSTimeZone returns other DST information than java.util.TimeZone
- Subject: Re: NSTimeZone returns other DST information than java.util.TimeZone
- From: Chuck Hill <email@hidden>
- Date: Thu, 6 Nov 2008 09:44:30 -0800
On Nov 6, 2008, at 4:31 AM, Andri vonAllmen wrote:
Hi Folks,
because the Timezone information was obsolete, i recently updated
the Java Timezone data from 'tzdata2003a' to 'tzdata2008g' by using
'tzupdater.jar'.
NSTimezone example for Asia/Shanghai:
System.out.println("***** Timezone = " +
NSTimeZone.timeZoneWithName("Asia/Shanghai", true) + " /
useDaylightTime = " + NSTimeZone.timeZoneWithName("Asia/Shanghai",
true).useDaylightTime());
...returns...
***** Timezone = Asia/Shanghai (CST) offset 28800 / useDaylightTime
= true
java.utils.TimeZone example for Asia/Shanghai:
System.out.println("***** Timezone = " + TimeZone.getTimeZone("Asia/
Shanghai"));
...returns...
***** Timezone = sun.util.calendar.ZoneInfo[id="Asia/
Shanghai
",offset
=28800000,dstSavings=0,useDaylight=false,transitions=19,lastRule=null]
Short: NTTimezone is telling me, that in Shanghai DST is used and
java.util.TimeZone tells me that it is not used. I know that in
Shanghai there is no DST at all.
Since NSTimezone inherits from java.util.TimeZone this difference is
some kind of weird but i could not figure out how to update the
NSTimezone information or anything else what would cause into
correct results.
Any hints are welcome.
Maybe this will help: http://worldofwebobjects.blogspot.com/2007/01/not-exactly-masters-of-time-and-space.html
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden