From 1db42538864e1f235fee1b37b44ca428b1f3c427 Mon Sep 17 00:00:00 2001 From: Josef Gajdusek Date: Mon, 11 May 2015 02:00:19 +0200 Subject: lib: Move time utility functions to common library. --- stmhal/moduos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stmhal/moduos.c') diff --git a/stmhal/moduos.c b/stmhal/moduos.c index 24f2e0f1f..55404c77b 100644 --- a/stmhal/moduos.c +++ b/stmhal/moduos.c @@ -34,6 +34,7 @@ #include "genhdr/mpversion.h" #include "lib/fatfs/ff.h" #include "lib/fatfs/diskio.h" +#include "timeutils.h" #include "rng.h" #include "file.h" #include "sdcard.h" @@ -322,7 +323,7 @@ STATIC mp_obj_t os_stat(mp_obj_t path_in) { } else { mode |= 0x8000; // stat.S_IFREG } - mp_int_t seconds = mod_time_seconds_since_2000( + mp_int_t seconds = timeutils_seconds_since_2000( 1980 + ((fno.fdate >> 9) & 0x7f), (fno.fdate >> 5) & 0x0f, fno.fdate & 0x1f, -- cgit v1.2.3