Skip to content

Commit 92d9118

Browse files
robert-hhdpgeorge
authored andcommitted
rp2/fatfs_port: Fix the modification date of files.
It was off by 2000 % 128 == 80 years. Addresses issue micropython#9535.
1 parent b25087f commit 92d9118

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/rp2/fatfs_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
MP_WEAK DWORD get_fattime(void) {
3131
datetime_t t;
3232
rtc_get_datetime(&t);
33-
return ((2000 + t.year - 1980) << 25) | ((t.month) << 21) | ((t.day) << 16) | ((t.hour) << 11) | ((t.min) << 5) | (t.sec / 2);
33+
return ((t.year - 1980) << 25) | ((t.month) << 21) | ((t.day) << 16) | ((t.hour) << 11) | ((t.min) << 5) | (t.sec / 2);
3434
}

0 commit comments

Comments
 (0)