Does a day start at 1:00 AM everwhere?

Mark Powell mark_powell at symantec.com
Fri Oct 27 11:39:47 EDT 2006


Jim and Ken:

Aargh. I hate it when something I'd hope would be easy turns into a
rathole. 

My problem is that I have two inputs.  One is the user inputting a date.
Another is the creation date in seconds that has previously been
extracted via a 'detailed files' call, which has been concatenated in
the format below.   

C:/RevolutionStacks/SortTest/!?!Sept_009K.jpg!/9040/1157431138

What I wanted to do is to express the input date in seconds and test it
against item -1 of each line in the container (there are potentially >
100,000 such lines in a container). Using dateItems or 'word 1 of
tFileDateTime' as you suggest would require modification to the original
'detailed files' extraction algorithm, which doubtless will have a
ripple effect elsewhere.  So, is there not any reliable way to compare
seconds to seconds?  Or do I have to go the route of approximation.

Also Ken, the DST et. al. wrinkles you describe:  does that affect the
interpretation of a creation date extracted from the file?  Or is the
complication confined to how a particular user's computer calculates a
time query?  For example, if a user's OS displays a creation date for
"foo.txt" as 11/21/05, will Rev not always interpret it as 11/21/05?  Or
can fencepost error arise where Rev misinterprets the static date?

Thanks again

Mark Powell
 

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Mark
Powell
Sent: Friday, October 27, 2006 6:53 AM
To: use-revolution at lists.runrev.com
Subject: Does a day start at 1:00 AM everwhere?

I have a user-specified date.  I want to convert it to seconds and
factor in 86400 to establish the range of seconds for that date, so that
I can compare a file's creation date to determine whether that file was
created on that specified day.  The problem is I am not sure what is
used as the starting point for a date's seconds counter.  At 6:42 this
morning, I ran this:

  put the short date into theDate
  convert theDate to seconds
  put ((the seconds - theDate) / 3600)

and got 4.710556, which suggests that a date starts at 1:00 AM and not
midnight.  Is this accurate?  And more importantly, is this the way the
computation would be handled on any client machine anywhere?

Thanks

Mark Powell

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list