unix/fatfs_port: Fix month offset in timestamp calculation.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
2a72e90ab8
commit
a909c21587
@ -5,7 +5,7 @@ DWORD get_fattime(void) {
|
||||
time_t now = time(NULL);
|
||||
struct tm *tm = localtime(&now);
|
||||
return ((1900 + tm->tm_year - 1980) << 25)
|
||||
| (tm->tm_mon << 21)
|
||||
| ((tm->tm_mon + 1) << 21)
|
||||
| (tm->tm_mday << 16)
|
||||
| (tm->tm_hour << 11)
|
||||
| (tm->tm_min << 5)
|
||||
|
Loading…
Reference in New Issue
Block a user