newnews y2k bug in 2.2.1

Russell Vincent russellv at uk.uu.net
Thu Oct 28 14:57:51 UTC 1999


> newnews ins.pcprive 991231 000102
> 501 Bad date

Does the attached patch fix it?

I don't have a machine that I can adjust the date, otherwise
I would do it.

 -Russell

Index: misc.c
===================================================================
RCS file: /news/cvs/inn/nnrpd/misc.c,v
retrieving revision 1.28.2.5
diff -c -r1.28.2.5 misc.c
*** misc.c	1999/08/24 00:23:48	1.28.2.5
--- misc.c	1999/10/28 14:56:30
***************
*** 235,241 ****
  	century = current->tm_year / 100;
  
  	/* Convert current year to two digits if necessary. */
! 	if (current->tm_year > 100)
  		current->tm_year -= century * 100;
  
  	if (year <= current->tm_year)
--- 235,241 ----
  	century = current->tm_year / 100;
  
  	/* Convert current year to two digits if necessary. */
! 	if (current->tm_year >= 100)
  		current->tm_year -= century * 100;
  
  	if (year <= current->tm_year)


More information about the inn-workers mailing list