Commit f3ae4128 authored by Rahix's avatar Rahix

Merge 'Fix time zone offset handling in time_ms'

See merge request card10/firmware!283
parents 794fc7ac 937fc82c
......@@ -45,8 +45,8 @@ MP_DEFINE_CONST_FUN_OBJ_0(time_time_obj, time_time);
static mp_obj_t time_time_ms(void)
{
uint64_t milliseconds;
milliseconds = epic_rtc_get_milliseconds() -
(EPOCH_OFFSET + TZONE_OFFSET) * 1000ULL;
milliseconds = epic_rtc_get_milliseconds() - EPOCH_OFFSET * 1000ULL +
TZONE_OFFSET * 1000ULL;
return mp_obj_new_int_from_ull(milliseconds);
}
MP_DEFINE_CONST_FUN_OBJ_0(time_time_ms_obj, time_time_ms);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment