rp2/datetime_patch: Fix year and month offset for mktime wrapper.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
43bd57f94b
commit
47741e2757
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user