Re: creating NSCalendarDate with a specific time zone
Re: creating NSCalendarDate with a specific time zone
- Subject: Re: creating NSCalendarDate with a specific time zone
- From: "stephen joseph butler" <email@hidden>
- Date: Thu, 11 May 2006 17:29:54 -0500
2006/5/11, Nick Zitzmann <email@hidden>:
On May 11, 2006, at 3:47 PM, stephen joseph butler wrote:
> My problem: how do I create an NSCalendarDate with the proper time
> zone set?
<file:///Developer/ADC Reference Library/documentation/Cocoa/
Reference/Foundation/ObjC_classic/Classes/NSCalendarDate.html#//
apple_ref/occ/instm/NSCalendarDate/setTimeZone:>
That's all well and good, except it's going to adjust the time of my
object for the new zone, and I don't want that. I have a GMT timestamp
stored in a NSCalendarDate with a CST time zone (for example).
Thinking about it further, I suppose I can use
dateByAddingYears:months:days:hours:minutes:seconds: and [[NSTimeZone
localTimeZone] secondsFromGMT] to pre-adjust the time before calling
setTimeZone:. That just seems rather hackish.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden