summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eaa8512)
raw | patch | inline | side by side (parent: eaa8512)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 30 Apr 2005 21:31:28 +0000 (14:31 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 30 Apr 2005 21:31:28 +0000 (14:31 -0700) |
We looked at the year one character too early, and we
didn't accept a two-character year date after 2000.
didn't accept a two-character year date after 2000.
date.c | patch | blob | history |
index ffa4246aa04cae3775ef29307362651fc31191c3..15f28198e125ae08af937ca7f302c7a18c88f22a 100644 (file)
--- a/date.c
+++ b/date.c
tm->tm_mon = num - 1;
tm->tm_mday = num2;
if (*end == c && isdigit(end[1])) {
- num3 = strtoul(end, &end, 10);
+ num3 = strtoul(end+1, &end, 10);
if (num3 > 1900)
num3 -= 1900;
+ else if (num3 < 38)
+ num3 += 100;
tm->tm_year = num3;
}
break;