Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建我的应用程序的试用版。
试用期最长应为 3 天。
最近我才明白,事情没那么简单。当我尝试使用系统日期计算 3 天时,用户将当前日期更改为过去一天,因此它增加了试用期。那么,任何人都可以建议如何保持3天的试用期?
软件开发平台:Visual Studio 2008
语言:C#(Windows 窗体)
你可以试试:
保存开始日期。如果开始日期高于当前时间 -> 退出
或者您可以切换到:计算程序运行的分钟数。超过 600 -> 退出(或 800 或 900)
或者您可以从互联网而不是本地获取时间:
http://www.timeapi.org/utc/now