Max date in OpenWRT



  • Hi Community,

    Came accros this interesting phenomenon:
    904ffa0d-c214-4b06-bf1f-012935673317-image.png

    Setting a date doesn't work after 2038. This is not sooooo far away, and there is a good chance, some devices going into the field today will still be working in 15 years.

    What might happen, when this point is reached? Couldn't find anything related to this issue.



  • I assume you are on the OpenWrt 19.x based version of the firmware?

    I just tried on my OpenWrt 22.x, and your example and also 100 years later works fine:

    date --set '2150-01-01 20:00:00'
    Thu Jan  1 20:00:00 CET 2150
    

    I know that musl (the libc replacement OpenWrt uses) has switched to 64bit time_t sometime between 19.x and 22.x as I had to fix some tools that were not prepared for 64bit time when I switched to 22.x

    So if you upgrade to 22.x or later sometime in the next 14 years, you'll be fine šŸ˜‰


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.