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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to