What is the proper way to handle times in C code for 32-bit embedded Linux (ARMLinux) to ensure that the code continues to work properly after 03:14:07 UTC on 19 January 2038 (when a signed 32-bit time_t
overflows)? Given that time_t
is signed 32-bit on the system I have to use, what are the alternatives?
A considerable amount of googling has uncovered nothing of practical use. Everyone seems to assume that we will all be using 64-bit OSs by then, but this patently isn't true of embedded systems.
On the system I am required to use, __kernel_time_t
is defined as a long
. Which presumably means that there is no kernel facility for 64 bit time. The version of uClibc is 0.9.29.
I can't believe I'm the only one with this problem, and I don't want to reinvent the wheel.