libs/libc/time: fix regression in clock_calendar2utc

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2022-10-27 22:41:01 +02:00 committed by Xiang Xiao
parent 6940ca8677
commit 6908b6823c

View File

@ -162,7 +162,7 @@ time_t clock_calendar2utc(int year, int month, int day)
/* Add in the extra days for the leap years prior to the current year. */
days += (year - EPOCH_YEAR - 1) >> 2;
days += (year - (EPOCH_YEAR - 1)) >> 2;
/* Add in the days up to the beginning of this month. */