• 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: Country code or name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Country code or name


  • Subject: Re: Country code or name
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 16 Sep 2003 01:23:15 -0400

On Sep 15, 2003, at 4:50 PM, Tom Harrington wrote:

On Monday, September 15, 2003, at 12:47 PM, mmalcolm crawford wrote:
On Sep 15, 2003, at 10:48 AM, Chuck Soper wrote:
Is there anyway that I can grab the text in the "System Preferences:Date & Time:Time Zone" Closest City field? For example, if the text reads, "New York - U.S.A.", how do I programmatically get that text from a Cocoa application?

[[NSUserDefaults standardUserDefaults] arrayForKey:@"com.apple.TimeZonePref.Last_Selected_City"]

I'm not sure of the exact format of the array, but...

Would it be obnoxious to ask if this is documented anywhere?

nope.. I'd say that is unofficial....


A simpler way to get the closest city without the rest of the details would be to use [[NSTimeZone localTimeZone] name], which in my case returns "America/Denver".


this however looks much better, and is supported
_______________________________________________
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: Country code or name
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: Country code or name (From: Tom Harrington <email@hidden>)

  • Prev by Date: Re: Load order of nib internals
  • Next by Date: Re: Country code or name
  • Previous by thread: Re: Country code or name
  • Next by thread: Re: Country code or name
  • Index(es):
    • Date
    • Thread