Dear community, as already mentioned here https://devzone.nordicsemi.com/f/nordic-q-a/30622/nrf_cal_set_time-setting-issue-for-2100-year/121167 Im wondering how do you deal with the 2038 year problem in your applications. We are supplying sensor loggers and our products are usually used for very long time after installed (20 years is not unheard of) - as we have recently switched to NRF52 modules and are using the time.h from SES (5.32A) the time_t is defined as long, which will eventually hit us with the Y2038 problem. Since we are using the time.h library heavily - especially the tm struct and localtime_r() I was wondering whether there is a reasonably good way to fix this.
One of the options I was thinking of is to actually offset the time_t value by 50 years, so I will be interpreting the timestamp as seconds since 2020, not since 1970, but Im not sure this will work well with interpreting the leap years and other specialties of time like different time offsets done in the past?
Is there a good solution here to pursue?
Thanks,
Marcel