Date: Fri, 15 Jan 1999 02:40:03 -0800 (PST) From: "Daniel O'Callaghan" <danny@hilink.com.au> To: freebsd-bugs@FreeBSD.ORG Subject: Re: misc/9500: `edithook' is not Y2K compliant Message-ID: <199901151040.CAA01240@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR misc/9500; it has been noted by GNATS.
From: "Daniel O'Callaghan" <danny@hilink.com.au>
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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901151040.CAA01240>
