• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimeZone returns other DST information than java.util.TimeZone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimeZone returns other DST information than java.util.TimeZone


  • Subject: NSTimeZone returns other DST information than java.util.TimeZone
  • From: "Andri vonAllmen" <email@hidden>
  • Date: Thu, 06 Nov 2008 13:31:15 +0100

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.
 
Regards
Andri
 _______________________________________________
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

  • Follow-Ups:
    • Re: NSTimeZone returns other DST information than java.util.TimeZone
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Lots of EOs slow down the performance
  • Next by Date: Update & Delete of an Enterprise Object causes EOEditingContext.saveChanges() to Exception
  • Previous by thread: Re: XML namespaces in WOGenericComponent
  • Next by thread: Re: NSTimeZone returns other DST information than java.util.TimeZone
  • Index(es):
    • Date
    • Thread