Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date & Time for auditing
Message
 
To
27/02/2002 09:24:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00625648
Message ID:
00625795
Views:
9
>>>My auditing functions report who made what changes, and when. The problem is, they currently use the date & time from the users' machine - and in some cases, this is way off.
>>>
>>>Does anyone have experience how to solve this, without checking each and every machine every day? Might be some centralized solution, like getting the datetime from the server, and either use that for auditing, or holler if it doesn't match the datetime on the local machine close enough.
>>>
>>>Hilmar.
>>
>>What I do in my application is the Data/Time from the server is our base. Now what if the server clock is messed up, well that is another problem, but not as big a problem as how many PC clocks dont agree.
>
>Thanks.
>
>Can you show me how to get the time for the server? Some API function, I assume.
>
>Hilmar.

You could go with a simple method:
* First lets get a synq date time from the novell sever</font>
* as the users computer may have there clock off</font>
lcMyServerFile = oData.Code40SysDir+"\TEMP\"+SUBSTR(sys(2015),3,8)+'.CLK'
handle=fcreate(lcMyServerFile)
=fclose(handle)
lcDate = fdate(lcMyServerFile)
lcTime = ftime(lcMyServerFile)
erase (lcMyServerFile)
Or you cold go with a more complex solution found in FAQ 617
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform