From: Ulrich Drepper Date: Thu, 17 Apr 1997 23:30:22 +0000 (+0000) Subject: Interpret year number 00-59 as 2000--2059. X-Git-Tag: cvs/libc20x-ud-970417~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7c5a468dcc0f5aeda11ca444a6374e0a7fdf4a7;p=thirdparty%2Fglibc.git Interpret year number 00-59 as 2000--2059. --- diff --git a/time/strptime.c b/time/strptime.c index 89cfa8e2a4f..fd457af6c01 100644 --- a/time/strptime.c +++ b/time/strptime.c @@ -537,7 +537,7 @@ strptime_internal (buf, format, tm, decided) case 'y': /* Match year within century. */ get_number (0, 99); - tm->tm_year = val; + tm->tm_year = val >= 50 ? val : val + 100; break; case 'Y': /* Match year including century number. */