
From: Gilles Detillieux <grdetil@scrc.umanitoba.ca>
To: htdig@htdig.org
Subject: [htdig] Patch

This should help with PR#81 & PR#472, where strftime() would crash on
some systems.  Idea submitted by benoit.sibaud@cnet.francetelecom.fr.

--- htdig-3.1.2.bak/htdig/Document.cc	Wed Aug  4 12:43:27 1999
+++ htdig-3.1.2/htdig/Document.cc	Wed Aug  4 13:37:43 1999
@@ -215,6 +215,8 @@ Document::getdate(char *datestring)
 	// correct for mystrptime, if %Y format saw only a 2 digit year
 	if (tm.tm_year < 0)
 	  tm.tm_year += 1900;
+	tm.tm_yday = 0;	// clear these to prevent problems in strftime()
+	tm.tm_wday = 0;
 	
 	if (debug > 2)
 	  {

