date anomalies when converting to seconds
Kay C Lan
lan.kc.macmail at gmail.com
Mon May 22 23:06:05 EDT 2006
On 5/23/06, Jim Ault <JimAultWins at yahoo.com> wrote:
>
> If you look in the archives, this topic was recently discussed fairly
> well.
> The operating systems do date and time and daylight savings differently.
> This is inherent in each system. If these calculations are critical to
> your
> operation, you should invest a bit of time building a small date-time
> library to add to your distribution.
I've found that when your only interested in dates, simply adding a
'generic' time solves most of these problems; I generally use 06:00:00 as it
is after the daylight saving switch over time, don't use 12:00:00 as there
are 12h/24h problems that can crop up.
So in Chris' case:
put "01/06/2006" && "06:00:00" into tDate
convert tDate to seconds
put tDate
will always give the correct answer regardless of OS, timezone, date or
daylight savings.
HTH
More information about the use-livecode
mailing list