• 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
Detecting time zone changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Detecting time zone changes
      • From: Nicko van Someren <email@hidden>
  • Prev by Date: Re: Rolling back sharedAddressBook changes
  • Next by Date: Re: OT: ADC hardware assets, spare or unused before 06/24?
  • Previous by thread: Re: Rolling back sharedAddressBook changes
  • Next by thread: Re: Detecting time zone changes
  • Index(es):
    • Date
    • Thread