year workaround in struct tm

merge-requests/2/head
bzt 2 years ago
parent d52531b92e
commit 4a0fcfb243

@ -83,7 +83,7 @@ uint64_t __year_to_secs(uint64_t year, int *is_leap)
time_t __mktime_efi(efi_time_t *t)
{
__tm.tm_year = t->Year + 98;
__tm.tm_year = t->Year + (/* workaround some buggy firmware*/ t->Year > 2000 ? -1900 : 98);
__tm.tm_mon = t->Month - 1;
__tm.tm_mday = t->Day;
__tm.tm_hour = t->Hour;

Loading…
Cancel
Save