我想在 Java 中获取当前时间,但没有 Internet 且没有系统时间

I want to get current time in Java but without the Internet and without the system time

我想获得准确的当前时间。我不想要系统时间,因为它可以被任何人更改,我想在不访问互联网的情况下这样做,有什么办法吗?

时间服务器

在您的本地网络上设置 time server。让您的应用联系该本地时间服务器以查询当前时间。

考虑将时间服务器计算机放在 network’s DMZ so as to updates from time servers on the Internet such as the pool.ntp.org project or those provided by the United States federal government (NIST)

无线电时钟

获得一个radio clock with a USB连接,用于输出当前时间,该时间由连接到时间标准(如原子钟)的无线电发射器发射的时间码同步。发射机在世界上许多国家广播。

Meinberg Global company, at least, offers several such devices

GPS

类似于上面的无线电时钟,一个GPS接收器(Global Positioning System) signals might also capture and relay the time signal. Or perhaps GALILEO or GLONASS or similar systems

日晷

sundial outside a window. Attach a webcam 定位到有问题的计算机。将网络摄像头放在 window 中。编写一个应用程序来根据日晷的当前图像解释一天中的时间。