From owner-freebsd-bugs Fri Jan 15 02:40:42 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA22420 for freebsd-bugs-outgoing; Fri, 15 Jan 1999 02:40:42 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA22412 for ; Fri, 15 Jan 1999 02:40:40 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id CAA01240; Fri, 15 Jan 1999 02:40:03 -0800 (PST) Date: Fri, 15 Jan 1999 02:40:03 -0800 (PST) Message-Id: <199901151040.CAA01240@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: "Daniel O'Callaghan" Subject: Re: misc/9500: `edithook' is not Y2K compliant Reply-To: "Daniel O'Callaghan" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/9500; it has been noted by GNATS. From: "Daniel O'Callaghan" To: peter.jeremy@alcatel.com.au Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: misc/9500: `edithook' is not Y2K compliant Date: Fri, 15 Jan 1999 21:36:16 +1100 (EST) On Fri, 15 Jan 1999, Peter Jeremy wrote: > >Number: 9500 > >Category: misc > >Synopsis: `edithook' is not Y2K compliant > > The `edithook' script in the CVSROOT directory uses a raw tm_year and > will therefore display 01/01/100 for 2000-JAN-01. > > --- /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; This should really be $today = sprintf("%d/%02d/%02d", $year + 1900, $mon+1, $mday); ie. yyyy/mm/dd, not mm/dd/yyyy Any objections to changing the log date format thus? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message