Skip to content
Commit 47e10a68 authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Christopher Friedt
Browse files

drivers: lora: fix RtcGetCalendarTime()



Uptime in milliseconds is assigned to uint32_t variable, which results
in integer overflow after enough time has expired. Additionally
milliseconds part (which should be 0-999) is assigned directly from
uptime, without subtracting full seconds.

Fix both issues by using int64_t variable and calculating milliseconds
with modulo.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@grinn-global.com>
parent ed55ee95
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment