mktime() expects months numbered 0-11
patatetom opened this issue · 0 comments
patatetom commented
diff --git a/src/fatxfs_fuse.c b/src/fatxfs_fuse.c
index 9ab8bb6..0dfca51 100644
--- a/src/fatxfs_fuse.c
+++ b/src/fatxfs_fuse.c
@@ -276,7 +276,7 @@ int fatx_fuse_get_attr(const char *path, struct stat *stbuf)
timeinfo.tm_min = attr.modified.minute;
timeinfo.tm_hour = attr.modified.hour;
timeinfo.tm_mday = attr.modified.day;
- timeinfo.tm_mon = attr.modified.month;
+ timeinfo.tm_mon = attr.modified.month-1;
timeinfo.tm_year = attr.modified.year-1900;
stbuf->st_mtime = mktime(&timeinfo);