datetime: Add comment explaining what the offset means

This commit is contained in:
FintasticMan 2024-10-06 01:56:57 +02:00
parent 8432cbe8f8
commit f6592efbe9
No known key found for this signature in database
GPG key ID: A00F1AB6DB1ED386

View file

@ -28,6 +28,7 @@ DateTime::DateTime(Controllers::Settings& settingsController) : settingsControll
ASSERT(mutex != nullptr); ASSERT(mutex != nullptr);
xSemaphoreGive(mutex); xSemaphoreGive(mutex);
// __DATE__ is a string of the format "MMM DD YYYY", so an offset of 7 gives the start of the year
SetTime(compileTimeAtoi(&__DATE__[7]), 0, 0, 0, 0, 0); SetTime(compileTimeAtoi(&__DATE__[7]), 0, 0, 0, 0, 0);
} }