Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Mac dates ==> UNIX dates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac dates ==> UNIX dates



On 2006-10-20, at 12:28:10, Marc Myers wrote:

Is there a simple way to convert a Mac date into an integer that can be used as the -r parameter in the UNIX "date" command?

set d to (current date) as string
set r to (do shell script "echo 'puts [clock scan {" & d & "}]' | tclsh")
do shell script "date -r " & r


The 'clock scan …' command can handle all normal types of date formats but I'm not sure if it works with languages other than English.

Philip Aker


 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

References: 
 >Mac dates ==> UNIX dates (From: Marc Myers <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.