Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WTF is the significance of {^1906-03-09 22:56:52}? :-)
Message
 
 
To
10/11/2003 21:20:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00848551
Message ID:
00848830
Views:
11
Hi Stefan,

I use following code to account for midnight for SECONDS() function. It works for intervals less than 24 hours.
lnStart = SECONDS()
...
lnInterval = SECONDS() - lnStart
lnInterval = IIF(lnInterval >=0, lnInterval, lnInterval + 84600)
>Sergey, thanks for the pointer. ConvertDateTime.prg in file #9704 did indeed contain the solution to the riddle - a 'dynamic' epoch of 00-01-00 coupled with years that are a nice round 367 days long. A somewhat brutish solution to the problem that years are actually 365.25 days give or take a few jiffies ... Somehow this reminded me of some state or other where the legislators decided that irrational numbers had no place in rational discourse and therefore decreed that the value of pi would henceforth be 3.0. ;-)
>
>Of course, this means that a timer based on my naive Sys2015ToSeconds() will be off by almost a year if it runs past midnight on December 31st of any given year and even more when running into New Year's day in 2100 ... Hehe! I guess this must be yet another incarnation of TANSTAAFL.
>
>So it's either the more cumbersome/pedestrian (and slightly slower) GetSystemTimeAsFileTime() or SECONDS() plus midnight reset special-casery.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform