handle_core: fix silly year issue
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 13 May 2011 16:58:50 +0000 (09:58 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 13 May 2011 16:58:50 +0000 (09:58 -0700)
Should be using tm_year + 1900

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>

handle_core.c

index 0ae3f82..93d03cc 100644 (file)
@@ -80,7 +80,7 @@ static void get_core_name(const char *core_dir, const char *exe_name,
        time(&now);
        tm = localtime_r(&now, &tm_buf);
        snprintf(core_name, PATH_MAX, "%s/core.%d-%lld-%lld_%lld.%s", core_dir,
-                       tm->tm_year, (long long)tm->tm_mon, (long long)tm->tm_mday,
+                       tm->tm_year + 1900, (long long)tm->tm_mon, (long long)tm->tm_mday,
                        (long long)now, exe_name);
 }