bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: ls default time style


From: Bruno Haible
Subject: Re: ls default time style
Date: Tue, 11 Dec 2001 13:19:32 +0100 (CET)

Markus Kuhn writes:

> > -rw-r--r--    1 bin     bin      2188323 12-03 00:00 fileutils-4.1.3.tar.gz
> > -rw-r--r--    1 bin     bin      1812537 2001-04-29  fileutils-4.1.tar.gz
> > 
> > This date format HAS NEVER BEEN SEEN in Germany and is totally
> > unintelligible to any user.
> 
> ... You will see, that it lists both the old
> little-endian dotted all-numeric format (24.08.1998) as well as the
> modern international standard form (1998-08-24).

I was talking about the "12-03" line which means 3rd of December, not
12th of March. I repeat that it has never been seen in Germany.
Except for the YYYY-MM-DD (ISO 8601) form, Germans always put the day
before the month.

> It also leads the way towards reducing the differences between
> locales

Why should this be a goal? There are differences between the ways
Germans and Americans write the dates, the currencies, the numbers.
Internationalization means to make it possible for programs to follow
the locale conventions, not the contrary.

> Yes, it's very much a question of what should be the default outside
> the POSIX locale.

It should be locale dependent. Your "MM-DD" syntax represents a local
American habit which can't be generalized upon the world.

> In practice, the old default led to some real problems, as the dates
> got too long and were too hard to parse automatically.

Programs that wish to parse "ls" output should call in the POSIX
locale. It's for this purpose that POSIX specifies how ls output looks
like in the POSIX locale. Btw, if a user has set the environment
variable TIME_STYLE, such programs will not only need to set LC_ALL=C,
but also unset TIME_STYLE. IMO, for best POSIX compliance, in the C
locale, ls should not look at the TIME_STYLE environment variable.

But by default, output of programs like "ls" are parsed by a human
user.

Bruno



reply via email to

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