Using Seconds in Revolution

SimPLsol at aol.com SimPLsol at aol.com
Tue Apr 13 15:48:52 EDT 2004


     Is this a feature or a bug?
     Revolution usually handles legacy HyperCard code very well. So I was 
surprised to find a problem with a 15 year old HC script that converts a group of 
dates to seconds and adds 86400 in a repeat loop to get the next date to 
check. This worked in Revolution from Jan 1st, 2004 to April 3rd, 2004. 
     April 3rd, 2004 was a problem -   I discovered that this day only had 
82,800 seconds (23 hours) - and items for the 4th were put on the 3rd, items for 
the 5th were put on the 4th, etc.
     I did a little more checking (guided by that wise Wizard of the Fourth 
World, R. Gaskin) and found Revolution always assigns 23 hours to the day 
daylight savings time (summer time) starts and 25 hours to the day it ceases.
     I can see some logic in this. But how should one increase the date in a 
repeat loop? Convert everything to dateItems and add 1 to item 3 of it? Is 
this safe? Or are there hidden gottchas with that as well.
     Also, there should be some warning in the documentation for HC 
programmers, in HC every day had 86400 seconds.
     An aside, why does the beginning of time, Jan. 1 1970, convert to 
"36000" seconds? Why not "0"? Isn't "36000" 10 am?
     Thanks in advance for you assistance, I do appreciate it.
Paul Looney


More information about the use-livecode mailing list