简体   繁体   English

PHP从离线PC获取真实日期

[英]PHP get real date from offline pc

我正在为客户端创建离线 php 系统,我想在没有互联网的情况下获得确切日期并且考虑到用户可以更改PC 时间,那么解决方案是什么?

date() will use the system time, unless otherwise specified not to. date() 将使用系统时间,除非另有说明。 That being said, you cannot avoid the user from changing their system clock.话虽如此,您无法避免用户更改他们的系统时钟。 If you want to make sure date and time are not changed by the user, use the internet to validate.如果要确保用户未更改日期和时间,请使用 Internet 进行验证。 Since you must be offline, you'll just have to trust the user.由于您必须处于离线状态,因此您只需要信任用户即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM