Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Daylight Saving Time?
Message
 
 
To
04/04/2001 09:55:54
Jon Nelson
Trader Systems Limited
Reading, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00491818
Message ID:
00491858
Views:
13
>Hi,
>
>I've just spent the last few days trying to track down a 'bug' in one of our applications.
>
>The application has a 'Start of Day' process that is executed at 00:05:00 every morning. The routine uses a simple poll until execution time is ready using the SECONDS() function. The routines have been used for at least the last three years without any problems - until now.
>
>I have now traced the problem down to the change to Summertime. Out of the 250 or so installations (All NT 4 Server and Workstations) about 50 machines reported the SECONDS() incorrectlty. All machines are configured with same regional and timesone settings (W.Europe Time).
>
>To be more precise the SECONDS() function appear not to recongnise the change to summer time - indicating 23:05 instead of 00:05. The TIME() and the SYS(5) function.
>
>Has anyone else had similar experiences??
>
>I had wondered why two apparently similar functions are provided by VFP - is this 'feature' by design or a bug??

Jim,

I ran some test with time(), seconds() and sys(2) on mt PC.
As you can see time() and sys(2) follow PC clock ajustments but seconds() doesn't. Note that Sys(2) returns correct value.

It looks like sys(2) uses system clock and seconds() relies on some internal foxpro computations.

BTW, I got similar results under VFP 7 beta 1.
Time()    Seconds() Sys(2)
--------  --------- ----- 
10:14:07  36870.943 36847
10:14:08  36872.043 36848
10:14:09  36872.890 36849
Time on PC adjusted by +1 hour
11:14:23  36890.881 40463
11:14:24  36891.559 40464
11:14:25  36892.166 40465
Back to correct time
10:14:37  36907.362 36877
10:14:38  36908.325 36878
10:14:39  36909.111 36879
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform