Commit 6f622dd0 authored by Thomas Roessler's avatar Thomas Roessler

A slightly optimized version of DE's y2k patch.

parent ef9003dd
......@@ -178,8 +178,8 @@ 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 < 70 ? yr + 100 : (yr > 1900 ? yr - 1900 : yr);
tm.tm_year = yr > 1900 ? yr - 1900 : (yr < 70 ? yr + 100 : 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