Re: System Date Format-follow-up
Re: System Date Format-follow-up
- Subject: Re: System Date Format-follow-up
- From: John Baltutis <email@hidden>
- Date: Wed, 3 Sep 2003 23:32:52 -0700
On 9/3/03, Paul Berkowitz <email@hidden> wrote:
>
>
Does anyone know a shell script for getting the system short date and system
>
time formats as set in System Preferences?
>
>
There must be a way. There are apps which can access these from the system
>
somehow.
>
And then I wrote:
Try these:
set _date to (do shell script "date +%m/%d/%y;:")
set _time to (do shell script "date +%H:%M:%S;:")
{_date, _time}
******************
I missed the part about the values as set in the system prefs. Those are
stored in the .GlobalPreferences.plist file resident in
~/Library/Preferences/ which you can read with the Property List Editor.
The short date string is stored in the NSShortDateFormatString (ex: %m/%d/%y)
and the time string is stored in the NSTimeFormatString (ex:
%1I:%M:%S-12-hour clock)
->{"09/03/03", "1I:29:51"}
The only thing I can't figure out is how to extract those values. If you
come up with a solution, let me know.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.