aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 51ae8e4..148712f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -237,7 +237,10 @@ static void ftag_add_one_file(sqlite3 *db,
if (read_len > 1) {
struct tm tm;
memset(&tm, 0, sizeof(tm));
- rc = sscanf(date_str, "%d-%d-%d\n", &tm.tm_year, &tm.tm_mon, &tm.tm_mday);
+ rc = sscanf(date_str, "%d-%d-%d\n",
+ &tm.tm_year, &tm.tm_mon, &tm.tm_mday);
+ tm.tm_year -= 1900;
+ tm.tm_mon -= 1;
date = mktime(&tm);
if (rc != 3) {
perror("sccanf");