date anomalies when converting to seconds

Sarah Reichelt sarah.reichelt at gmail.com
Wed May 24 00:44:06 EDT 2006


On 5/23/06, Chris Sheffield <cmsheffield at gmail.com> wrote:
> Jim,
>
> I owe you an apology. You were correct. This problem is tied to
> daylight savings. I realized that after taking your advice and
> looking at the list archives. Fortunately, with some suggestions and
> code from Sarah Reichelt, I was able to workaround the problem, I
> think. Further testing will tell for sure.
>
> So thank you. And thank you, Sarah, for your wonderful DateTime
> library. Saved me a lot of work.

You're welcome. As everyone who reads these lists will know, I've done
a lot of whinging about this problem. I would like a "localSeconds"
that just got converted regardless of time zone, daylight savings or
anything else, so that the same number always gave the same date &
time, no matter what computer it was converted on.

Since it seems unlikely that I will get what I want, I am gradually
starting to use my own numeric dateTime format and conversion
routines: YYYYMMDD, HHMMSS or the 2 combined. As well as being totally
numeric which is great for sorting, they have the advantage of being
human-readable.

When I have it all worked out, I'll add the routines to the library
(or maybe update it completely to use only them).

Cheers,
Sarah



More information about the use-livecode mailing list