-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Y2038 tracking issue / strategy #13277
Copy link
Copy link
Closed
Labels
Area: POSIXArea: POSIX API wrapperArea: POSIX API wrapperType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)
Milestone
Description
Description
Embedded devices tend to run for a long time once deployed.
Currently there are several places in RIOT where mktime() / time_t is used. This will break on 2038-01-19.
Linux solved this by using 64 bit timestamps. I don't think this can be a general solution for RIOT as a mayor use case is using the result of mktime() to configure a 1 Hz RTT as RTC where the counter register is only 32 bit.
Since RTC is unlikely to be set to the past, we could use a custom offset ('RIOT epoch') or implement a custom version/wrapper for mktime() that returns unsigned values.
affected RTC implementations
Useful links
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: POSIXArea: POSIX API wrapperArea: POSIX API wrapperType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)