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: Paul Eggert
Subject: Re: ls default time style
Date: Tue, 11 Dec 2001 11:13:17 -0800 (PST)

> From: Bruno Haible <address@hidden>
> Date: Tue, 11 Dec 2001 13:19:32 +0100 (CET)

> 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.

Good point.  This problem is not limited to TIME_STYLE, though; it
also applies to other environment variables that the GNU utilities
use: QUOTING_STYLE, VERSION_CONTROL, BLOCK_SIZE, etc.

Hmm, is this really a POSIX-compliance issue, though?  Can't POSIX
implementations can place constraints on your environment?
E.g. Solaris tells you to prepend /usr/xpg4/bin to your PATH.
I just glanced at POSIX 1003.1-200x draft 7 and couldn't see where
Solaris could do that, but I assume that they can somehow.

But even if it isn't a POSIX-compliance issue, it is a pragmatic one.

On the GNU system, the POSIXLY_CORRECT environment variable
historically has been the way to say "I really want POSIX semantics,
even if that conflicts with GNU semantics".  So, if POSIXLY_CORRECT is
set, perhaps TIME_STYLE etc. should be ignored.  Otherwise, we'd have
to tell people "if you really want POSIX semantics, you must set
POSIXLY_CORRECT and you must also not set a bunch of other environment
variables", which will be a pain for them as that list of environment
variables grows.



reply via email to

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