mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
Include "hard-locale.h".
(main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since POSIX specifies the behavior only in the POSIX locale.
This commit is contained in:
1 parent
1391da81e0
commit
db2fa4fdcd
1 file changed
+3
-2
@@ -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: */
|
||||
|
||||
Reference in new issue
Block a user