Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mktime() expects months numbered 0-11 #7

Open
patatetom opened this issue Feb 25, 2018 · 0 comments
Open

mktime() expects months numbered 0-11 #7

patatetom opened this issue Feb 25, 2018 · 0 comments

Comments

@patatetom
Copy link

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant