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

前端 未结 5 828
情歌与酒
情歌与酒 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:29

    No. In the absence of any external communications, all you've got is the clock in the computer. If you're not going to trust that, you're stuffed.

    Of course, if you're trying to prevent someone from blowing a timed trial licence of software, you could do things like recording the latest UTC time you've ever seen, and becoming suspicious if you see an earlier startup time than the previous startup... especially if you see that repeatedly. That's not the same as getting the real date, of course.

提交回复
热议问题