Hi,
I’m working on a real-time application that requires several devices in a local network to be time-synced with each other. The system time of the PLCnext controller is used as the reference time and all other devices synchronize with this time. The software is expected to run for at least 20 years in this configuration.
Given the Year 2038 Problem I tried to verify whether the system would work past the particular date (when the Unix epoch runs out of memory). When I attempted to set the system time to 1st of January 2040 the operating system crashed immediately and rebooted, after which the system time appeared to be reset to the current time (or maybe it was never changed at all).
I suspect that the system time is stored using a 32-bit signed integer, making it susceptible to the Year 2038 Problem. Now I know that 2038 is still quite some years away
, but I was curious if you plan to update the Linux kernel anytime soon (from version 5.6 system time is stored as a 64-bit number). This would allow me to further test my application.
Thank you in advance!
Kind regards,
Bart
This has been reproduced on AXC F 2152 FW 2022.6.
It appears that the problem is not with the Linux kernel, but rather with the PLCnext Runtime. If you stop the PLCnext Runtime, then the date can be set to dates beyond 2038, without any problem.
This has been reported to the PLCnext Runtime developers for analysis and correction.
The problem has been confirmed by the developers and is currently scheduled to be fixed in the next firmware release (version 2023.0 LTS). I don’t know if that fix will allow the date to be set past 2038.