Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 1999 16:22:39 +1100
From:      Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   misc/9500: `edithook' is not Y2K compliant
Message-ID:  <99Jan15.162202est.40343@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help

>Number:         9500
>Category:       misc
>Synopsis:       `edithook' 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:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Alcatel Australia
>Environment:

	

>Description:

The `edithook' script in the CVSROOT directory uses a raw tm_year and
will therefore display 01/01/100 for 2000-JAN-01.

>How-To-Repeat:

Code inspection

>Fix:
	
--- /3.0/CVSROOT/edithook	Tue Mar 28 17:57:13 1995
+++ ./edithook	Fri Jan 15 14:46:37 1999
@@ -276,7 +276,7 @@
 
 sub create_timestamps {
     ($sec,$min,$hour,$mday,$mon,$year) = localtime;
-    $today	= sprintf("%02d/%02d/%02d", $mon+1, $mday, $year);
+    $today	= sprintf("%02d/%02d/%04d", $mon+1, $mday, $year + 1900);
     $nowtime	= sprintf("%02d:%02d:%02d", $hour, $min, $sec);
     $date	= $today . ' ' . $nowtime;
 }

>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.162202est.40343>