Link to home
Start Free TrialLog in
Avatar of JDN
JDN

asked on

Reading system time from server

Hi Experts,

I my company we're using a small Delphi program on all workstations that's using the system time. It is important that this time is the actual time.
Problem is that the system time on the different workstation differs. You can of course adjust the time of all system clocks, so they all supply the same time. But within a few days there will be a difference again between all workstation.

Now, to be sure my program is registering the same time on all workstations, I like to read the system time of one single pc, for instance the Windows NT server.

Can anyone tell me how to do this? Or is there maybe another way to read the same time on all my workstations?

Thanks,
JDN
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia image

You can use the NISTIME utility which can be downloaded here:

http://www.parkenet.com/apl/NISTime.htm

it will basically synchronise the time on machines based on a time server (it could be a global server or a server that you set up).


HTH
DragonSlayer
Hi

If you're making use of SQL Server ... to get the system time from the Server you use the following code:

Select getdate() ... this will return the current system date and time from the server.

You can also syncronize the time on startup of the application.

Regards
ASKER CERTIFIED SOLUTION
Avatar of TOndrej
TOndrej

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JDN
JDN

ASKER

Your routine works perfect. This was exactly what I needed.
Glad to hear that :-)