diff --git a/lib/timeutils/timeutils.c b/lib/timeutils/timeutils.c index 518f570090..c897131c65 100644 --- a/lib/timeutils/timeutils.c +++ b/lib/timeutils/timeutils.c @@ -158,8 +158,8 @@ mp_uint_t timeutils_seconds_since_2000(mp_uint_t year, mp_uint_t month, + (year - 2000) * 31536000; } -mp_uint_t timeutils_mktime(mp_uint_t year, mp_uint_t month, mp_uint_t mday, - mp_uint_t hours, mp_uint_t minutes, mp_uint_t seconds) { +mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday, + mp_int_t hours, mp_int_t minutes, mp_int_t seconds) { // Normalize the tuple. This allows things like: // diff --git a/lib/timeutils/timeutils.h b/lib/timeutils/timeutils.h index d6e3536ad7..c3f1fc2db1 100644 --- a/lib/timeutils/timeutils.h +++ b/lib/timeutils/timeutils.h @@ -49,7 +49,7 @@ void timeutils_seconds_since_2000_to_struct_time(mp_uint_t t, mp_uint_t timeutils_seconds_since_2000(mp_uint_t year, mp_uint_t month, mp_uint_t date, mp_uint_t hour, mp_uint_t minute, mp_uint_t second); -mp_uint_t timeutils_mktime(mp_uint_t year, mp_uint_t month, mp_uint_t mday, - mp_uint_t hours, mp_uint_t minutes, mp_uint_t seconds); +mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday, + mp_int_t hours, mp_int_t minutes, mp_int_t seconds); #endif // __MICROPY_INCLUDED_LIB_TIMEUTILS_H__