2

Possible Duplicate:
How to Query an NTP Server from C#

Hi Guys,

Is there a common way to query the internet time api of windows? E.g. time.windows.com I want to get the time from such a open time server, because I can't rely on the system time of windows.

And perferable I would need a C# Solution ;)

Thx

Community
  • 1
  • 1
BitKFu
  • 3,649
  • 3
  • 28
  • 43
  • There are third party tools that replace Window's NTP client with a fuller implementation of NTP for more precision. Rather than having your application's time different to the rest of the system (and remember you cannot override the system time for many operations) wouldn't it be easier to fix the system time. Also remember that within a domain you need to use the domain time server to avoid kerberos problems. – Richard Mar 25 '11 at 08:01
  • Is there always a domain time server? I don't want to change the system time of windows. But it's used for a time recording tool, and therefore the users are not allowed to cheat ;) – BitKFu Mar 25 '11 at 08:47
  • In a domain there is always a time server (it'll be one of the domain controllers) because kerberos authentication needs time on each participating machine to be within 5min (IIRC). Therefore in a domain user's shouldn't be able to change system time (setting timezone is OK, underneath Windows/AD is using UTC anyway). Windows NTP client is targeted at that 5min max, not the full precision NTP is capable of. – Richard Mar 25 '11 at 09:02

0 Answers0