diff options
author | Damien George <damien@micropython.org> | 2021-01-18 02:54:18 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-01-29 23:57:10 +1100 |
commit | 33f10381d6cf47a6c6e1ce44ce3debb44ebbaa9d (patch) | |
tree | e224da2521065931794cb979d528a7562f432ac5 /lib/timeutils/timeutils.c | |
parent | 75fea330bffe9c916def8bf1521d7d9143eceac2 (diff) |
lib/timeutils: Provide simple impl of extra funcs when Epoch is 1970.
Dates/times must be post 2000/1/1 to work correctly with these simple
implementations.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'lib/timeutils/timeutils.c')
-rw-r--r-- | lib/timeutils/timeutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/timeutils/timeutils.c b/lib/timeutils/timeutils.c index fc8b5e7fc..af210d994 100644 --- a/lib/timeutils/timeutils.c +++ b/lib/timeutils/timeutils.c @@ -158,7 +158,7 @@ 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_int_t month, mp_int_t mday, +mp_uint_t timeutils_mktime_2000(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: |