On Sep 22, 2009, at 2:52 PM, Brian Johnson wrote:
> property zdate: date "Monday, August 10, 1992 11:00:00 AM"
> set file_name to ((current date)-zdate as text) & ".html"
set time_offset to do shell script "date -j 081011001992 +%s"
do shell script "date -j -v-" & time_offset & "S +%s.html"
Might even be faster.
Let me explain the code.
the time_offset is the difference between your epoch date and the unix
one or 713458800 seconds
-j means don't set the clock
-v means I don't want now I want some other time
the S means I want it offset in seconds and the minus means before
now. I am not sure what happens if the epoch cross each other.
the +%s means output in seconds since the epoch.
-Mark
y2k was an epoch fail.