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 šŸ˜‰



  • @luz : Thanks for this. I'm running the firmware version 0.3.4 (running OpenWRT 18.06) which is the latest version before the newest OpenWRT 23.05 released by Onion in October this year. I do not wan't to switch to 23.05 as according to the docs quite relevant changes have been made, and I do not wan't to affect my firmware.
    So basically, I can either run a OpenWRT Version 18.06 with the date issue or switch to 23.05 which will be a huge hassle....

    Any idea?





  • @MK When I switched from OpenWrt 18 to 22 is was quite smooth, but it depends on what functionality you are using. Initially the network setup was a pain, then changing MUX setting of a couple of pins was an issue. Then an issue with ledchain, then an issue requiring conversion of sqlite3 db. Mostly these were easily resolved so now I run 23 on my devices without issue. Also initially I started experimenting with OWRT 19, jumped to 22 then went into production on 23.



  • @crispyoz Thanks for the return of experience. But I understand you are using your own OS images and not the ones from Onion. The latest firmware (up to November 2024) was 0.3.4 based on OpenWRT 18.06 and now they made a jump to OpenWRT 23.05. Correct?



  • @MK Correct. OWRT 19 was really not much more than a kernel and toolchain upgrade. OWRT 20 was never officially released. OWRT 21 included a load of networking changes so it was the most logical to change up to but then OWRT 22 came along pretty quickly and fixed the 2038 date issue and upgraded firewall technology so it was nice step forward. Alas it broke the GPIO numbering so many of us needed to rejig things and that takes time. Hence 23 is the logical step forward.

    The custom firmware build I use is mainly to debloat things and add in my own software and configuration, I try to stay as close as possible to the Onion build.


Log in to reply
 

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