Skip to content

Commit

Permalink
rp2/fatfs_port: Fix the modification date of files.
Browse files Browse the repository at this point in the history
It was off by 2000 % 128 == 80 years.

Addresses issue #9535.
  • Loading branch information
robert-hh authored and dpgeorge committed Oct 11, 2022
1 parent b25087f commit 92d9118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/rp2/fatfs_port.c
Expand Up @@ -30,5 +30,5 @@
MP_WEAK DWORD get_fattime(void) {
datetime_t t;
rtc_get_datetime(&t);
return ((2000 + t.year - 1980) << 25) | ((t.month) << 21) | ((t.day) << 16) | ((t.hour) << 11) | ((t.min) << 5) | (t.sec / 2);
return ((t.year - 1980) << 25) | ((t.month) << 21) | ((t.day) << 16) | ((t.hour) << 11) | ((t.min) << 5) | (t.sec / 2);
}

0 comments on commit 92d9118

Please sign in to comment.