Re: Converting UNIX TIME STAMP to Mac Os X Date
Re: Converting UNIX TIME STAMP to Mac Os X Date
- Subject: Re: Converting UNIX TIME STAMP to Mac Os X Date
- From: Steve Thompson <email@hidden>
- Date: Sat, 12 Mar 2011 23:35:37 +0000
On 12 Mar 2011, at 18:19, Bernardo Hoehl wrote: work on 10.5 and 10.6
I don't have access to 10.5 so can't check it, but this is how I'd do it:
my convertUnixTimeStamp("1299244966") on convertUnixTimeStamp(UTS) set {oldDelims, AppleScript's text item delimiters} to {AppleScript's text item delimiters, " "} set ditems to text items of ((do shell script "date -r " & UTS) as string) set AppleScript's text item delimiters to oldDelims end convertUnixTimeStamp
Result: {"Fri", "Mar", "", "4", "13:22:46", "GMT", "2011"}
Steve |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden