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
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?
On Fri, Jan 15, 1999 at 12:47:07PM -0500, Bill Fumerola wrote: > > > $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? > > Yes. What is your foundation for the new format? Perhaps this is just my > American citizenship coming through, but mm/dd/yyyy is the way most people Which is really just a good argument for converting it to something that is (relatively) internationalization-neutral. -- This .sig is not innovative, witty, or profund.
State Changed From-To: open->closed Fixed in revision 1.2 by danny@FreeBSD.org.