NSCalendarDate saving and loading to get the same date-time (Floating Timezone)
NSCalendarDate saving and loading to get the same date-time (Floating Timezone)
- Subject: NSCalendarDate saving and loading to get the same date-time (Floating Timezone)
- From: "Sarat Kongara" <email@hidden>
- Date: Tue, 10 Oct 2006 08:50:37 -0700
Hi Shawn,
I finally found the term and an example for what I am trying to do. I am
trying to implement a floating timezone in my application.
Try this.
1. In iCal create an event (note the date-time of the event).
2. Quit iCal and In System Preferences change the timezone (different
continent preferably)
3. Launch iCal again and note the date-time of the event. It will be
different and it is correct because the date-time is adjusted based on the
timezone.
4. Now change the timezone back to the original timezone.
5. Quit and launch iCal.
5. In iCal preferences (Advanced) check the "Turn on time zone support".
6. Edit the iCal event and set the timezone to "Floating" (In the Info
drawer of the event).
7. Quit iCal.
8. Change the timezone in the System Preferences and run iCal. The date-time
is the same as the original date-time (that is it is not adjusted based on
the time zone).
Sorry I couldn't explain it better before without an example application
doing the same. Any suggestions on how to implement this feature? Thank you.
Regards
Sarat
On 10/9/06, Shawn Erickson <email@hidden> wrote:
On Oct 9, 2006, at 2:09 PM, Sarat Kongara wrote:
> Thanks Shawn. I understand the NSDate behaviour better now. I guess
> the best option for me is to save the Timezone with the dates so I can
> adjust them on load or save the components individually
> (mm,dd,yyyy,hh,mm,ss).
I still don't understand what your issue is. The NSDate you save is
the same one you get back when you load what you saved (same in the
sense that it represents the same exact time). You should have no
need to adjust anything.
Can you better describe the problem you are trying to solve?
-Shawn
_______________________________________________
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