Skip to content
Snippets Groups Projects
Commit f3ae4128 authored by rahix's avatar rahix
Browse files

Merge 'Fix time zone offset handling in time_ms'

See merge request card10/firmware!283
parents 794fc7ac 937fc82c
No related branches found
No related tags found
No related merge requests found
Pipeline #3764 passed
......@@ -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);
......
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