Skip to content
Commit a36d0981 authored by Antonis Sioutas's avatar Antonis Sioutas Committed by Anas Nashif
Browse files

drivers: counter: stm32: Fix alarm time calculation



The calculated alarm time starts from 2000 but the gmtime_r needs as
input the time from epoch (1970). This causes the alarm time to be
miscalculated due to leap years, as 2000 is a leap year and 1970 is not.
To fix the issue, the 2000 timestamp can be added to the input time of
gmtime_r.

Fixes #32260

Signed-off-by: default avatarAntonis Sioutas <antonis.si510@gmail.com>
parent 73a3eba5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment