Subject: Re: ls(1) and dates in the future
To: Jan Schaumann <jschauma@netmeister.org>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-userlevel
Date: 08/08/2004 11:50:03
Jan Schaumann wrote:
> (lapdog) ls -l foo
> -rw-------  1 jschauma  wheel  308 Aug 10 00:00 foo
> (lapdog) 
> 
> I believe it should do:
> 
> -rw-------  1 jschauma  wheel  308 Aug 10  2004 foo

This seems to be sensible change. I'd say go ahead with it.

Jaromir
 
> This is the patch:
> 
> Index: print.c
> ===================================================================
> RCS file: /cvsroot/src/bin/ls/print.c,v
> retrieving revision 1.38
> diff -b -u -r1.38 print.c
> - --- print.c     26 Dec 2003 06:19:19 -0000      1.38
> +++ print.c     31 Jul 2004 19:44:57 -0000
> @@ -385,7 +385,7 @@
>         if (f_sectime)
>                 for (i = 11; i < 24; i++)
>                         (void)putchar(longstring[i]);
> -       else if (ftime + SIXMONTHS > now && ftime - SIXMONTHS < now)
> +       else if (ftime + SIXMONTHS > now && ftime <= now)
>                 for (i = 11; i < 16; ++i)
>                         (void)putchar(longstring[i]);
>         else {
> 
> 
> Is that correct?  FWIW, GNU ls(1) and IRIX' ls(1) do show the year for
> anything in the future, while FreeBSD's behaves as ours and OpenBSD's
> doesn't seem to care about future dates at all.
> 
> -Jan
> 
> -- 
> Tradition is the illusion of permanence. -- Woody Allen
-- End of PGP section, PGP failed!

-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-