Commit 1817e889 authored by Thomas Roessler's avatar Thomas Roessler

Try to avoid other programs' possible y2k bugs.

parent 3fb0d2bc
......@@ -178,7 +178,7 @@ time_t is_from (const char *s, char *path, size_t pathlen)
/* year */
if (sscanf (s, "%d", &yr) != 1) return 0;
tm.tm_year = yr > 1900 ? yr - 1900 : yr;
tm.tm_year = yr < 70 ? yr + 100 : (yr > 1900 ? yr - 1900 : yr);
dprint (3,(debugfile, "is_from(): month=%d, day=%d, hr=%d, min=%d, sec=%d, yr=%d.\n",
tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year));
......
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