In our SlimLine systems two system time management functions are available:
SysDateGetS (time in seconds):
This function returns the system date and time in UTC expressed in seconds, using a 32-bit UDINT variable. The supported time range extends from 00:00:00 on January 1st, 1970 to 06:28:15 on February 7th, 2106.
SysDateGetNs (time in nanoseconds):
This function returns the system date and time in UTC expressed in nanoseconds, using a 64-bit ULINT variable. The supported time range extends from 00:00:00 on January 1st, 1970 to 23:34:33.709 on July 21st, 2554.
Both functions are therefore immune to the Year 2038 problem (Y2K38). The first overflow limitation occurs with SysDateGetS in 2106, while using SysDateGetNs extends the limit up to 2554.
However, the issue may arise from how the PLC program is implemented. If DATE and DATE_AND_TIME data types are used, the system may still be exposed to the Y2K38 problem. For this reason, we recommend using 64-bit data types in application development wherever possible.
More information is available in this article.