user279521
user279521

Reputation: 4807

An api to get actual time for asp.net

My server clock is running slow for some reason. I need to put a timestamp on my database transactions and need a reliable time source. Is there an api to the world time zone site or something similar?

Upvotes: 0

Views: 356

Answers (1)

driis
driis

Reputation: 164301

You know you can get the server to automatically synchronize with a known time server, right ? Might be easier than coding something custom.

If you want to implement it yourself, you will need to implement a client of the Simple Network Time Protocol (or find an open source one). There are plenty of SNTP servers available, and the SNTP should be relatively easy to implement. Here is the RFC.

Upvotes: 1

Related Questions