rp2/datetime_patch: Fix year and month offset for mktime wrapper.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2024-10-24 11:22:59 +11:00
parent 43bd57f94b
commit 47741e2757

View File

@ -38,5 +38,5 @@ struct tm *localtime_r(const time_t *__restrict time, struct tm *__restrict loca
}
time_t mktime(struct tm *__restrict tm) {
return timeutils_mktime(tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
return timeutils_mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
}