diff options
author | Jim Meyering <jim@meyering.net> | 2004-06-15 18:00:20 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-06-15 18:00:20 +0000 |
commit | db2fa4fdcdc0a6ccb1087b62a48c2e0a6e91fdec (patch) | |
tree | 1ed764aa762f9f9729be64a8fdf3299b22f7b5f0 /src | |
parent | 1391da81e02b3a1279f58f96b6420369e50a07b6 (diff) | |
download | coreutils-db2fa4fdcdc0a6ccb1087b62a48c2e0a6e91fdec.tar.xz |
Include "hard-locale.h".
(main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since
POSIX specifies the behavior only in the POSIX locale.
Diffstat (limited to 'src')
-rw-r--r-- | src/pr.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -316,6 +316,7 @@ #include <sys/types.h> #include "system.h" #include "error.h" +#include "hard-locale.h" #include "mbswidth.h" #include "posixver.h" #include "xstrtol.h" @@ -1074,8 +1075,8 @@ main (int argc, char **argv) } if (! date_format) - date_format = (getenv ("POSIXLY_CORRECT") - ? dcgettext (NULL, "%b %e %H:%M %Y", LC_TIME) + date_format = (getenv ("POSIXLY_CORRECT") && !hard_locale (LC_TIME) + ? "%b %e %H:%M %Y" : "%Y-%m-%d %H:%M"); /* Now we can set a reasonable initial value: */ |