From peter.jeremy@auss2.alcatel.com.au  Thu Jan 14 21:26:20 1999
Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA19200
          for <FreeBSD-gnats-submit@FreeBSD.ORG>; Thu, 14 Jan 1999 21:26:19 -0800 (PST)
          (envelope-from peter.jeremy@auss2.alcatel.com.au)
Received: by border.alcanet.com.au id <40346>; Fri, 15 Jan 1999 16:24:21 +1100
Message-Id: <99Jan15.162421est.40346@border.alcanet.com.au>
Date: Fri, 15 Jan 1999 16:24:54 +1100
From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
Reply-To: peter.jeremy@alcatel.com.au
To: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: PicoBSD's simple_httpd is not Y2K compliant
X-Send-Pr-Version: 3.2

>Number:         9503
>Category:       bin
>Synopsis:       PicoBSD's simple_httpd is not Y2K compliant
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 14 21:30:02 PST 1999
>Closed-Date:    Fri Jan 15 19:50:55 PST 1999
>Last-Modified:  Fri Jan 15 19:51:30 PST 1999
>Originator:     Peter Jeremy
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Alcatel Australia
>Environment:

	

>Description:

simple_httpd uses a raw tm_year and will therefore display 01/01/100
for 2000-JAN-01.

>How-To-Repeat:

Code inspection

>Fix:
	
--- /3.0/src/release/picobsd/tinyware/simple_httpd/simple_httpd.c	Fri Aug 28 03:38:45 1998
+++ ./simple_httpd.c	Fri Jan 15 14:46:37 1999
@@ -349,6 +349,8 @@
         struct tm *t;
         time(&now);
         t = localtime(&now);
+	if (t->tm_year >= 100)
+	    t->tm_year += 1900;
         sprintf(out, "%02d:%02d:%02d %02d/%02d/%02d",
                      t->tm_hour, t->tm_min, t->tm_sec,
                      t->tm_mday, t->tm_mon+1, t->tm_year );
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: danny 
State-Changed-When: Fri Jan 15 19:50:55 PST 1999 
State-Changed-Why:  
Date format fixed and made y2k compliant.  Thanks. 
>Unformatted:
