Skip to content

Y2038 tracking issue / strategy #13277

@benpicco

Description

@benpicco

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: POSIXArea: POSIX API wrapperType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions