fix(utime.c): Fix time zone offset handling in time_ms
Another bug in utime.c
, this time in utime.time_ms()
:
The time zone offset is added with the wrong sign, as a result of wrong precedence when adding parentheses to the multiplication with 1000:
Testcase:
import utime
s = utime.time()
ms = utime.time_ms()
diff = s - ms // 1000
if diff != 0:
print("time difference:", diff)
# will print 14400, or 4 hours, with the old code
# should print 0
Merge request reports
Activity
added 1 commit
- 04f3ec64 - fix(utime.c): Fix time zone offset handling in time_ms
added 1 commit
- 937fc82c - fix(utime.c): Fix time zone offset handling in time_ms
added 1-Bug 3-Pycardium labels
cc @hinerk
added 6 - Needs Testing label
mentioned in issue #146 (closed)
mentioned in commit f3ae4128
Please register or sign in to reply