diff --git a/Kernel/RTC.cpp b/Kernel/RTC.cpp index ef0734390a4..a3150041b60 100644 --- a/Kernel/RTC.cpp +++ b/Kernel/RTC.cpp @@ -1,5 +1,6 @@ #include "RTC.h" #include "CMOS.h" +#include namespace RTC { @@ -78,6 +79,8 @@ time_t now() unsigned minute = CMOS::read(0x02); unsigned second = CMOS::read(0x00); + ASSERT(year >= 2018); + return daysInYearsSinceEpoch(year - 1) * 86400 + daysInMonthsSinceStartOfYear(month - 1, year) * 86400 + day * 86400