RTC: Fix Linux RTC driver date format

replace/a2a50e309198a9337fc2ce98ada857b65f54829c
Federico Amedeo Izzo 2020-12-28 16:02:41 +01:00
rodzic 3ecf27392e
commit d4bc1bbd9c
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -58,9 +58,11 @@ curTime_t rtc_getTime()
t.hour = timeinfo->tm_hour;
t.minute = timeinfo->tm_min;
t.second = timeinfo->tm_sec;
t.year = timeinfo->tm_year + 1900;
t.day = timeinfo->tm_mday;
t.day = timeinfo->tm_wday;
t.date = timeinfo->tm_mday;
t.month = timeinfo->tm_mon + 1;
// Only last two digits of the year are supported in OpenRTX
t.year = (timeinfo->tm_year + 1900) % 100;
return t;
}