Rev. 1.32 moved a comment to the wrong line. The hack refered to

in the comment applies to a decision that needs to be made in relation
to the year 2000.

In fact, that statement probably should be changed to be
more generic (getting the year from the current time perhaps). Otherwise,
starting in 2069 two digit year conversions in date(1) will start assuming
1900 instead of 2000. hehe.
This commit is contained in:
mtm 2004-03-04 15:46:14 +00:00
parent 3c35de715f
commit ee4270905d

View File

@ -234,9 +234,9 @@ setthetime(const char *fmt, const char *p, int jflag, int nflag)
case 10: /* yy */
if (century)
lt->tm_year += ATOI2(p);
else { /* hack for 2000 ;-} */
else {
lt->tm_year = ATOI2(p);
if (lt->tm_year < 69)
if (lt->tm_year < 69) /* hack for 2000 ;-} */
lt->tm_year += 2000 - TM_YEAR_BASE;
else
lt->tm_year += 1900 - TM_YEAR_BASE;