*** libc/getabsdate.c.orig Tue Dec 10 23:23:05 1991 --- libc/getabsdate.c Sat Jan 1 16:54:46 2000 *************** *** 116,121 **** case YEAR: tm->tm_year = bigval; /* convert 4-digit year to 1900 origin */ ! if (tm->tm_year >= 1900) tm->tm_year -= 1900; break; --- 116,126 ---- case YEAR: tm->tm_year = bigval; + + /* convert 2-digit year 20xx to 1900 origin */ + if (tm->tm_year < 70) /* y2k */ + tm->tm_year += 100; + /* convert 4-digit year to 1900 origin */ ! else if (tm->tm_year >= 1900) tm->tm_year -= 1900; break; *** libc/getindate.c.orig Tue Dec 10 23:24:29 1991 --- libc/getindate.c Sat Jan 1 17:04:15 2000 *************** *** 150,156 **** tm->tm_year = atoi(line); ! if (tm->tm_year <= 0) return -1; /* year is non-positive or missing */ ! if (tm->tm_year >= 1900) /* convert year to 1900 origin, */ tm->tm_year -= 1900; /* but 2-digit years need no work */ SKIPOVER(line); /* skip year */ --- 150,159 ---- tm->tm_year = atoi(line); ! if (tm->tm_year < 0 || !isdigit(*line)) return -1; /* year is non-positive or missing */ ! ! if (tm->tm_year < 70) /* year is 2000 origin? */ ! tm->tm_year += 100; /* make 1900 origin y2k */ ! else if (tm->tm_year >= 1900) /* convert year to 1900 origin, */ tm->tm_year -= 1900; /* but 2-digit years need no work */ SKIPOVER(line); /* skip year */