• 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: System Date Format-follow-up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: System Date Format
  • Next by Date: Re: System Date Format-follow-up 2
  • Previous by thread: Update on my previous email re. changing creator type
  • Next by thread: Re: System Date Format-follow-up 2
  • Index(es):
    • Date
    • Thread