Understanding the Convert Command
gregory.lypny at videotron.ca
Sat Nov 20 01:20:46 EST 2004
Having trouble understanding the Convert command. I'm playing with the
following handler and using day/month/year format.
set useSystemDate to true
get fld "date"
convert it to long date and long time
put it into fld "converted date"
The online documentation for the Convert command notes:
"If you convert a date without a time to a form that includes the time,
the time will be given as 2 AM. (This is the default time because it is
the time of day when Daylight Savings Time begins and ends.)"
If I enter 1/10/2004 in the date field, I get Friday, October 01, 2004
3:00:00 AM, which is not 2 AM. And if I enter 1/10/2004 0:00:00, I get
Friday, October 01, 2004 1:00:00 AM.
I have many events occurring at 11:45 PM, where my data file contains
entries with 23:45:00, but entering 1/10/2004 23:45:00 gives me
Saturday, October 02, 2004 12:45:00 AM.
Finally, entering 1/10/2004 23:45:00 once again, and converting to the
long seconds gives me 1096692300, and converting back to the short date
and time gives me, 02/10/2004 12:45 AM, so I don't go back to where I
Am I missing something obvious, or does the Convert command assume that
the day starts at 1 AM rather than the stroke of midnight? The same is
true when converting to the dateItems. Do I have to subtract one hour
from all of my data to use it reliably?
Confused and likely embarrassed later,
More information about the Use-livecode