NTP Client using the Windows API

后端 未结 2 1612
别跟我提以往
别跟我提以往 2021-01-26 15:20

I\'m maintaining a legacy system (pre .NET). Is there any way to fetch the time from an NTP server using the Windows API? Failing that, I could probably create a COM object wi

2条回答
  •  灰色年华
    2021-01-26 15:30

    The best source that I found was http://www.dataman.ro/?page_id=39.

    However, I'm leaning toward using the time from a server on the local LAN/WAN, via NetRemoteTOD. Windows is supposed to keep the date synchronized from an NTP server automatically, as long as its configured properly on their local time server machine. Then if their Internet access goes down, I'll still be able to fetch the "standard" time.

提交回复
热议问题