how to get real date (not system date) by c# or c++?

前端 未结 5 782
情歌与酒
情歌与酒 2021-01-13 12:49

Is it possible to get real date (not system date) without any connection to internet? I developed my application by C#. DateTime.Now gets system date but I want to know real

5条回答
  •  北海茫月
    2021-01-13 13:25

    Without Internet you are going to need a GPS receiver or Radio clock device.

    You can call upon an NTP server if you can establish some form of Internet connection which should give accurate (atomic) time. C# doesn't have a built in NTP client that I know of but there is one available from:

    http://mftoolkit.codeplex.com/

    Info on NTP can be found here:

    http://en.wikipedia.org/wiki/Network_Time_Protocol

提交回复
热议问题