• 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: Mac dates ==> UNIX dates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Mac dates ==> UNIX dates (From: Marc Myers <email@hidden>)
 >Re: Mac dates ==> UNIX dates (From: kai <email@hidden>)

  • Prev by Date: Re: Satisfaction with Satimage (solved)
  • Next by Date: Colored Buttons?
  • Previous by thread: Re: Mac dates ==> UNIX dates
  • Next by thread: Re: Mac dates ==> UNIX dates
  • Index(es):
    • Date
    • Thread