Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding out time format of menu bar clock



On Jun 30, 2006, at 10:04 PM, Donald Hall wrote:

Does anyone know a way to determine programmatically in Cocoa whether or not the user has set the "use a 24-hour clock" option in the Date & Time preferences pane? Accessing NSTimeFormatString through NSUserDefaults gives you the time format for the current locale, not the menu bar clock. I would like to be able to see what the user is using in the menu bar, and then have my application show the time in the same format. I couldn't figure out where this information is stored - presumably in a plist somewhere.

Perhaps ~/Library/Preferences/com.apple.MenuBarClock.plist?

Although in most cases, the way to display a date or time shouldn't really be dictated by the format used in the menu bar clock. The clock settings I use are nothing like the standard date/time settings for my locale; they're appropriate for how I use the clock, but not for much else... :-)

steve

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >finding out time format of menu bar clock (From: Donald Hall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.