Detecting time zone changes
Detecting time zone changes
- Subject: Detecting time zone changes
- From: Nicko van Someren <email@hidden>
- Date: Fri, 23 Jan 2004 17:55:17 +0000
I've written a small application that, among other things, displays the
current time. With the toolbar clock if I go to the System Preferences
-> Time & Date -> Time Zones panel and change the time zone the clock
changes it's hour immediately. I'm trying to emulate this effect but
am having trouble. If I call either [NSTimeZone localTimeZone] or
[NSTimeZone systemTimeZone] the value returned seems to be fixed for
the run time of the program. Quitting the application and restarting I
get the correct time zone but I don't get the instant gratification if
the user changes zone while my program is running.
Can anyone out there tell me how I should find out the current time
zone if the user has changed it recently? Also, if anyone knows how to
get notification when this happens it would be helpful, as it would
save me having to check every second.
Thanks,
Nicko
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.