• 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
Re: WebObjects 5.3.3, DST and J2SE 1.4.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebObjects 5.3.3, DST and J2SE 1.4.2


  • Subject: Re: WebObjects 5.3.3, DST and J2SE 1.4.2
  • From: Mark Ritchie <email@hidden>
  • Date: Fri, 9 Mar 2007 13:54:18 -0500

On 7-Mar-07, at 11:34 AM, Baiss Eric Magnusson wrote:
It seems to me that I need to go back and associate a time zone id for all my events.
and then use this
tz = NSTimestamp.....
NSTimestamp myNSTimestamp = new NSTimestamp(year, month, day, hour, minute, seconds, tz)

Hi Baiss!

Use caution here! As had already been pointed out, NSTimestamp does not store time zone information. I believe that the tz argument in all the constructors is only used to interpret the other arguments. The docs say this for several of the constructors. The given information is converted and stored as millisecond offset since reference date in the reference timezone. That would be January 1, 1970, 00:00:00 GMT.

As Ken pointed out, you might be better of storing the local time and the time zone so that you can reconstruct the right times. Alternatively, you might find: timestampByAddingGregorianUnits(int years, int months, int days, int hours, int minutes, int seconds) useful. The docs say that it preserves time of day across DST changes.

The bit that I'm really interested in for your app is why the time changes back to being correct in April. Makes me wonder if something isn't up to date!?

Hope that helps!
Mark
__
Mark Ritchie
Cocoa and WebObjects Developer
Diamond Lake Consulting Inc.
Toronto, Ontario, Canada



_______________________________________________
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: WebObjects 5.3.3, DST and J2SE 1.4.2
      • From: Baiss Eric Magnusson <email@hidden>
References: 
 >WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Baiss Eric Magnusson <email@hidden>)
 >Re: WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Pascal Robert <email@hidden>)
 >Re: WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Baiss Eric Magnusson <email@hidden>)
 >Re: WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Ken Anderson <email@hidden>)
 >Re: WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Baiss Eric Magnusson <email@hidden>)
 >Re: WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Chuck Hill <email@hidden>)
 >Re: WebObjects 5.3.3, DST and J2SE 1.4.2 (From: Baiss Eric Magnusson <email@hidden>)

  • Prev by Date: Re: Xcode + WO book
  • Next by Date: Re: Getting information on updated n:m relationship
  • Previous by thread: Re: WebObjects 5.3.3, DST and J2SE 1.4.2, parse javascript help
  • Next by thread: Re: WebObjects 5.3.3, DST and J2SE 1.4.2
  • Index(es):
    • Date
    • Thread