I'm using facilities to manage timestamps of events. The platform is ARM Cortex-M3 (LPC1788) and I'm using MCUXpresso IDE (so arm-gcc toolchain). I configured the IDE to use newlib-nano library.
It's quite easy to use a time_t variable for a timestamp and use gmtime()/mktime() function to transform the number of seconds from epoch to a broken-down time structure (struct tm, with hours, days, ...)
However I noticed time_t is a 32-bit signed integer type... so it can't be used to store timestamps over year 2038 (only 21 years remains).
Is there a simple solution to force time_t to be a 64-bit integer?
avr-libc uses another "non-standard" approach. time_t is always 32-bits, but the epoch is year 2000 (not 1970). So the year of the bug is thirty years later than 2038.