From 92d911803812100fac109b6108ab005e7bbd4c82 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Fri, 7 Oct 2022 21:08:08 +0200 Subject: [PATCH] rp2/fatfs_port: Fix the modification date of files. It was off by 2000 % 128 == 80 years. Addresses issue #9535. --- ports/rp2/fatfs_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rp2/fatfs_port.c b/ports/rp2/fatfs_port.c index 3821d6586c..9706b6fe7d 100644 --- a/ports/rp2/fatfs_port.c +++ b/ports/rp2/fatfs_port.c @@ -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); }