diff options
| author | Damien George <damien@micropython.org> | 2024-10-24 11:22:59 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-10-24 11:22:59 +1100 |
| commit | 47741e2757db616de2b1f6f05e47ae52f336b3fd (patch) | |
| tree | 76057e8f200568167e3afc74e9cb7444ec641bad | |
| parent | 43bd57f94bb3a3ef06638105cebefac9611b7329 (diff) | |
rp2/datetime_patch: Fix year and month offset for mktime wrapper.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/rp2/datetime_patch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/rp2/datetime_patch.c b/ports/rp2/datetime_patch.c index 810af4cf1..73bea7429 100644 --- a/ports/rp2/datetime_patch.c +++ b/ports/rp2/datetime_patch.c @@ -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); } |
