bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: human-time?


From: Paul Eggert
Subject: Re: human-time?
Date: Thu, 10 Jan 2008 16:28:41 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> This thread reminds me of this poor warning message from make:
>
> make: Warning: File `Makefile.am' has modification time 7.9e+02 s in the 
> future
>
> There are humans that don't instinctual feel whether '7.9e+02 s' is a
> time difference in milliseconds or years...

I'll take the blame for that diagnostic, since I added it to "make".
For this particular example, I don't think the "human_time" interface
will help all that much.  Once the time is in the future, it doesn't
matter much whether it's milliseconds or years, "make" is broken.
Adding more details about whether it is milliseconds or years will
distract from the reader.

For other applications it might be nice to have more human-readable
times, but I don't find "7 weeks 5 days 12 hours 44 minutes 31
seconds" to be all that readable".  Better would be "8 weeks", or
perhaps "8.7 weeks".

Just to give you a feeling for the morass looming here: POSIX says
that "ls -l" is supposed to use one file format for files less than 6
months old, and another one for older files.  But how does "ls"
determine "6 months"?  POSIX doesn't say, and different
implementations do it in different ways.  GNU ls, at my suggestion,
uses 1/2 of an average Gregorian year (ignoring leap seconds).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]