>>>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:
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