In article <timstreater->,
Tim Streater <> wrote:
> I'd like to be able to get the user's settings for time/date, so that
> when I prepare times and dates for them, I can format it to their system
> settings. Is there a Terminal command I can use to acquire this info?
>
> Thanks,
I think the CLI access to system defaults is through the 'defaults'
command. Here's an article on the trove of various settings that
someone has compiled:
<
http://www.macgasm.net/2012/04/03/cu...-giant-list-of
-63-defaults-hacks-for-the-terminal/>
<https://github.com/mathiasbynens/dotfiles/blob/master/.osx>
But it doesn't list the date/time format. I spent the better part of 2
hours poking around preferences files and didn't find anything that lead
me to where the system date/time format is stored. I know it's
available to compiled applications. My guess is you're going to have to
write a command-line utility to ask MacOS "what is your system date/time
setting for 'short', 'medium', 'long', and 'full'. The APIs for this
are documented, so it shouldn't be to hard.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]