IMX8M yocto linux NTP bug (aka Y2K38)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8M yocto linux NTP bug (aka Y2K38)

1,036 Views
agmc1971
Contributor I

Hello,

my IMx8M yocto (SUMO) linux microcontroller evidence a problem in setting date/hour using NTP service if the system clock (RTC) have a date beyhond the 2038. If I write the year that is less than that date , NTP succeed to setting the right date/time.

Do you experienced similar issue, and if yes, what is the solution to this bug?

Thanks in advance for your help!

Best regards,

AG

0 Kudos
2 Replies

1,020 Views
b36401
NXP Employee
NXP Employee

Actually Linux starting with version 5.6 has 64-bit time_t (the type is used for the time) even on 32-bit architectures.
Now I see dates after the year 2038 are supported:

root@imx8mqevk:~# date 050113132222
Wed May 1 13:13:00 UTC 2222
root@imx8mqevk:~# date +%s
7962757988
root@imx8mqevk:~# touch file
root@imx8mqevk:~# ls -l --time-style=+%s file
0 -rw-r--r-- 1 root root 0 7962757992 file
root@imx8mqevk:~#

0 Kudos

1,026 Views
agmc1971
Contributor I

The solution is to use the latest yocto version: "Dunfell".

In that version the bug has been fixed.

0 Kudos