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.
我正在构建一个 PHP Web 应用程序,需要知道当前日期/时间是什么。我不能依赖服务器的设置。我可以使用任何网络服务吗?我知道通过 Web 服务访问时间会有一些延迟,但我对最后一毫秒不准确的东西很好。
是的,从公共 NTP 服务器获取。
在这里查看一个 PHP 实现:
http://www.kloth.net/software/timesrv1.php