[REBOL] epoch? Re:(3)

1999-10-28 Thread lmarzulli
Hi Bo It's optimized but is incorrect. The difference between two "dates" gives just the difference between the "days". Regards At 05:02 p.m. 28/10/99 -0700, you wrote: > >While we're on the subject of optimization, how about this? > >now - 1-1-1970 * 86400 > >Have fun! > > >On 28-Oct-1999/19:0

[REBOL] epoch? Re:(3)

1999-10-28 Thread ralph
> While we're on the subject of optimization, how about this? > > now - 1-1-1970 * 86400 > Elegant, except it's one day off ... should be now - 12-31-1969 * 86400, except that gives an invalid date. So, you could do: now - 1-1-1970 * 86400 + {{+ 86400 - however many seconds of this day has el

[REBOL] epoch? Re:(3)

1999-10-29 Thread ralph
> date: now > seconds: ((date - 1-1-1970) * 86400) + (date/time/hour * 3600) + > (date/time/minute * 60) + date/time/second > Gabriele has the closest solution yet, but it's still 4 hours short. I'm thinking, I'm thinking. --Ralph

[REBOL] epoch? Re:(3)

1999-10-29 Thread ralph
I'm off four hours using Gabriele's solution... could this be the difference between my time zone and GMT? If so, just adding 4 hours gives me the correct answer? --Ralph > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 29, 1999 6:33 AM >