Skip to content
Snippets Groups Projects
Verified Commit c4580819 authored by schneider's avatar schneider Committed by rahix
Browse files

fix(utime): Convert UTC RTC to Python epoch

parent 8b58c463
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
static mp_obj_t time_time(void)
{
mp_int_t seconds;
/* MicroPython has its epoch at 2000-01-01. Our RTC is in UTC */
seconds = epic_rtc_get_seconds() - 946684800UL;
return mp_obj_new_int(seconds);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment