Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christoph 'SuperVirus' Heitkamp
firmware
Commits
f3ae4128
Commit
f3ae4128
authored
Aug 31, 2019
by
Rahix
Browse files
Merge 'Fix time zone offset handling in time_ms'
See merge request
card10/firmware!283
parents
794fc7ac
937fc82c
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycardium/modules/utime.c
View file @
f3ae4128
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment