• 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: creating NSCalendarDate with a specific time zone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >creating NSCalendarDate with a specific time zone (From: "stephen joseph butler" <email@hidden>)
 >Re: creating NSCalendarDate with a specific time zone (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Undefined symbols error in deployment build
  • Next by Date: Re: creating NSCalendarDate with a specific time zone
  • Previous by thread: Re: creating NSCalendarDate with a specific time zone
  • Next by thread: Re: creating NSCalendarDate with a specific time zone
  • Index(es):
    • Date
    • Thread