fbiego / ESP32Time

An Arduino library for setting and retrieving internal RTC time on ESP32 boards
MIT License
212 stars 36 forks source link

RTC time update beyond 2034 did not work #10

Closed itzshahzad closed 2 years ago

itzshahzad commented 2 years ago

Hi,

I am using this library with ESP32 if I update the time to the 2038 year or above any year it does not hold a proper year. It goes back to different years for example rtc.setTime(58, 42, 12, 17, 10, 2045); H M S D M Y 12 42 58 17 10 2045

Response from the device 12:51:34 30:05:1905

Any suggestion or help is highly appreciated.

Thanks

fbiego commented 2 years ago

I think the issue is with the epoch time (long) which has a max value of 2,147,483,647 which translates to Tuesday, January 19, 2038 3:14:07 AM

itzshahzad commented 2 years ago

@fbiego Thanks for your reply. Is there any solution for this future-oriented problem?

fbiego commented 2 years ago

Looks like there's no solution for now

https://en.wikipedia.org/wiki/Year_2038_problem