Is there any other time service than system time that we can make use?

拟墨画扇 提交于 2019-12-08 11:17:32

问题


I am developing a desktop app and it have an trial period after which application will get expire. Currently I am using system time. Since user can easily change it, I thought its not a good way to follow.

Is there any other time service that is available which I can make use of? I heard something like system clock count or something like that which cannot be easily changed by user. Can anyone put light on this?


回答1:


If you don't want to trust the system clock, you are going to have problems.

Probably your best bet is an NTP or SNTP connection to establish the current time from authoritative time servers outside the organization - but you may easily be blocked by firewalls, etc.

However, that is really overkill; people don't futz with the system clock for long - it is far too much of a nuisance.




回答2:


A DIY solution using SNTP SNTP time class



来源:https://stackoverflow.com/questions/1930134/is-there-any-other-time-service-than-system-time-that-we-can-make-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!