Year 2000. (not a serious bug)

Already fixed?

I can't access the new version of HTWWWStr.c by Rick Currry
<URL:http://www.w3.org/Library/User/Patch/HTWWWStr.c>...


*** HTWWWStr.c.dist	Tue Jan  6 20:51:15 1998
--- HTWWWStr.c	Tue Jan  6 20:50:31 1998
***************
*** 339,345 ****
  		return 0;
  	    }
  	    tm.tm_year = strtol(s, &s, 10) - 1900;
! 	    tm.tm_mon  = strtol(++s, &s, 10);
  	    tm.tm_mday = strtol(++s, &s, 10);
  	    tm.tm_hour = strtol(++s, &s, 10);
  	    tm.tm_min  = strtol(++s, &s, 10);
--- 339,345 ----
  		return 0;
  	    }
  	    tm.tm_year = strtol(s, &s, 10) - 1900;
! 	    tm.tm_mon  = strtol(++s, &s, 10) - 1;
  	    tm.tm_mday = strtol(++s, &s, 10);
  	    tm.tm_hour = strtol(++s, &s, 10);
  	    tm.tm_min  = strtol(++s, &s, 10);
***************
*** 386,393 ****
  	tm.tm_mon  < 0  ||  tm.tm_mon  > 11  ||
  	tm.tm_year <70  ||  tm.tm_year >120) {
  	if (CORE_TRACE) HTTrace(
! 	"ERROR....... Parsed illegal time: %02d.%02d.%02d %02d:%02d:%02d\n",
! 	       tm.tm_mday, tm.tm_mon+1, tm.tm_year,
  	       tm.tm_hour, tm.tm_min, tm.tm_sec);
  	return 0;
      }
--- 386,393 ----
  	tm.tm_mon  < 0  ||  tm.tm_mon  > 11  ||
  	tm.tm_year <70  ||  tm.tm_year >120) {
  	if (CORE_TRACE) HTTrace(
! 	"ERROR....... Parsed illegal time: %02d.%02d.%04d %02d:%02d:%02d\n",
! 	       tm.tm_mday, tm.tm_mon+1, tm.tm_year + 1900,
  	       tm.tm_hour, tm.tm_min, tm.tm_sec);
  	return 0;
      }
***************
*** 460,470 ****
  #else
  	struct tm *loctime = localtime(calendar);
  #endif /* HT_REENTRANT */
! 	sprintf(buf,"%s, %02d %s 19%02d %02d:%02d:%02d",
  		wkdays[loctime->tm_wday],
  		loctime->tm_mday,
  		months[loctime->tm_mon],
! 		loctime->tm_year % 100,
  		loctime->tm_hour,
  		loctime->tm_min,
  		loctime->tm_sec);
--- 460,470 ----
  #else
  	struct tm *loctime = localtime(calendar);
  #endif /* HT_REENTRANT */
! 	sprintf(buf,"%s, %02d %s %04d %02d:%02d:%02d",
  		wkdays[loctime->tm_wday],
  		loctime->tm_mday,
  		months[loctime->tm_mon],
! 		loctime->tm_year + 1900,
  		loctime->tm_hour,
  		loctime->tm_min,
  		loctime->tm_sec);
***************
*** 475,485 ****
  #else
  	struct tm *gmt = gmtime(calendar);
  #endif
! 	sprintf(buf,"%s, %02d %s 19%02d %02d:%02d:%02d GMT",
  		wkdays[gmt->tm_wday],
  		gmt->tm_mday,
  		months[gmt->tm_mon],
! 		gmt->tm_year % 100,
  		gmt->tm_hour,
  		gmt->tm_min,
  		gmt->tm_sec);
--- 475,485 ----
  #else
  	struct tm *gmt = gmtime(calendar);
  #endif
! 	sprintf(buf,"%s, %02d %s %04d %02d:%02d:%02d GMT",
  		wkdays[gmt->tm_wday],
  		gmt->tm_mday,
  		months[gmt->tm_mon],
! 		gmt->tm_year + 1900,
  		gmt->tm_hour,
  		gmt->tm_min,
  		gmt->tm_sec);


Hidekazu Shiozawa
Department of Instrumentation Engineering, Keio University
shiozawa@myo.inst.keio.ac.jp

Received on Tuesday, 6 January 1998 07:11:03 UTC