time problems with daylight saving
sarahr at genesearch.com.au
Sun Nov 7 22:04:24 CST 2004
I'm back onto my pet bug to do with time zones & daylight saving. In
Rev 2.5 the original bug is fixed so that convert does not add an hour
with each conversion if you are in a positive time zone with daylight
saving using Mac OS X.
However, I am just deploying a major app in daylight savings affected
areas and having some problems because "the seconds" are not behaving
the way I expected.
set time zone to Brisbane (+1000), no daylight saving, get the seconds
switch to Melbourne (+1000), with daylight saving, get the seconds
allowing for the time needed to switch time zones, these both give the
If I use convert to change them to a readable date & time they give
times differing by 1 hour, which is correct.
At this point I get so confused that I can't work out what is right &
what is wrong, but basically, seconds is not allowing for daylight
savings but is the same value at the same actual moment, regardless of
the daylight savings settings. Internally Rev handles this so that
converting the seconds accommodates to daylight saving times.
As far as I am concerned, the major impact is that events occur in
remote machines (both with & without daylight saving) which get logged
with a time stamp in seconds format. These reports get emailed back to
base where there is no daylight saving and the times from machines with
daylight saving are then translated incorrectly so their reports are an
I am at a loss as to what to do. I guess if I can detect daylight
savings, I could add 3600 to the time stamps of any reports. But how
can I detect daylight savings? Rev must be able to do this, but I can't
find a way. Is there maybe an AppleScript way?
Any words of encouragement, advice or help would be greatly appreciated.
More information about the use-livecode