[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Y2k bug in /date command.
Yes, I got a similar fix earlier this month.
On Mar 11, Dave Hill wrote:
| Hi,
| I found a year 2000 bug in ircd 2.9.3 and verified
| it is still in 2.9.5. This bug will show up in the /date
| command and has a simple fix that I have attached (note the
| top case contains the fix). The sprintf assumes we are in the
| 1900's which we are, but not for much longer.
|
| *** s_misc.c.orig Wed Jun 18 11:00:38 1997
| --- s_misc.c Wed Mar 11 12:04:44 1998
| ***************
| *** 90,99 ****
| --- 90,106 ----
| if (minswest < 0)
| minswest = -minswest;
|
| + #ifndef NO_DAVE_BUG_FIX
| + (void)sprintf(buf, "%s %s %d %4d -- %02d:%02d %c%02d:%02d",
| + weekdays[lt->tm_wday], months[lt->tm_mon],lt->tm_mday,
| + lt->tm_year + 1900, lt->tm_hour, lt->tm_min,
| + plus, minswest/60, minswest%60);
| + #else
| (void)sprintf(buf, "%s %s %d 19%02d -- %02d:%02d %c%02d:%02d",
| weekdays[lt->tm_wday], months[lt->tm_mon],lt->tm_mday,
| lt->tm_year, lt->tm_hour, lt->tm_min,
| plus, minswest/60, minswest%60);
| + #endif
|
| return buf;
| }