Date: Fri, 15 Jan 1999 16:24:54 +1100 From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/9503: PicoBSD's simple_httpd is not Y2K compliant Message-ID: <99Jan15.162421est.40346@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
>Number: 9503 >Category: bin >Synopsis: PicoBSD's simple_httpd is not Y2K compliant >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 14 21:30:02 PST 1999 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Jan15.162421est.40346>