Commit a909c215 authored by Damien George's avatar Damien George

unix/fatfs_port: Fix month offset in timestamp calculation.

Signed-off-by: default avatarDamien George <damien@micropython.org>
parent 2a72e90a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment