From owner-cvs-all@FreeBSD.ORG Sat May 3 15:29:31 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8962C37B401; Sat, 3 May 2003 15:29:31 -0700 (PDT) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id A32D943FAF; Sat, 3 May 2003 15:29:30 -0700 (PDT) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id D84E5530E; Sun, 4 May 2003 00:29:28 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Giorgos Keramidas From: Dag-Erling Smorgrav Date: Sun, 04 May 2003 00:29:28 +0200 In-Reply-To: <20030503210442.GC3907@gothmog.gr> (Giorgos Keramidas's message of "Sun, 4 May 2003 00:04:42 +0300") Message-ID: User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3 References: <200305031639.h43GdYQ4049867@repoman.freebsd.org> <20030503205500.GB3907@gothmog.gr> <20030503210442.GC3907@gothmog.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/bin/ls extern.h ls.c print.c util.c src/bin/pax ar_io.c ar_subs.c cache.c cpio.c extern.h gen_subs.c getoldopt.c options.c pat_rep.c pax.c pax.h src/bin/ps fmt.c src/bin/rcp rcp.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2003 22:29:31 -0000 Giorgos Keramidas writes: > } else > - (void)strftime(buf, sizeof(buf), "%e%b%y", tp); > + (void)strftime(buf, sizeof(buf), "%e%b%Y", tp); > (void)printf("%-*s", v->width, buf); This won't fit, it's a 6-char field IIRC so the last two digits of the year get chopped off. This, BTW, is the code that produces the infamous 1Jan70 output :) Anyway, the point is that in this case the warning is wrong. The code is not Y2K safe but it can't be made Y2K safe without breaking the formatting - and it doesn't even need to be Y2K safe in the first place since the date displayed is known to lie between boottime and timeofday so you'd have to have a 100-year uptime for it to become a problem. DES -- Dag-Erling Smorgrav - des@ofug.org