Re: Mac dates ==> UNIX dates
Re: Mac dates ==> UNIX dates
- Subject: Re: Mac dates ==> UNIX dates
- From: Philip Aker <email@hidden>
- Date: Sun, 22 Oct 2006 04:10:38 -0700
On 2006-10-21, at 07:38:43, kai wrote:
It looks like the ultimate aim of the handler is to return a given
date in a specific format, Marc. If that's the case, have you
considered trying a little vanilla flavouring? The following, for
example, executes here about 100-150 times faster than the above
routine. (Handler contains one line; watch for wraps.)
kai probably nailed the end goal.
True that Yvan's previous reply left off the 'r', but that wasn't the
real problem.
It's going from AS date to shell date in seconds and then back to AS
to validate.
The following reports the same time OMM but it is WRONG:
set d to (current date)
set dstr to d as string
set istr to ((d - (time to GMT)) as «class isot») as string
set r to (do shell script "echo 'puts [clock scan {" & istr & "}]' |
tclsh")
set t to (do shell script "date -ur " & r)
{dstr, t}
Philip Aker
email@hidden
_______________________________________________
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