diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-09-28 17:32:15 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-07-01 13:12:52 +0100 |
commit | 8aa15b2be2bd2ab4b76d197a279abf8b9091680a (patch) | |
tree | 6a4d05b3b9d2c55875389f24dac5a4c032bca417 /src/ls.c | |
parent | 7336920dd07478b7bdae05ec599da4e2e66a94ff (diff) | |
download | coreutils-8aa15b2be2bd2ab4b76d197a279abf8b9091680a.tar.xz |
ls: use the POSIX date style when the locale does not specify one
Previously we defaulted to "long-iso" format in locales without
specific format translations, like the en_* locales for example.
This reverts part of commit 6837183d, 08-11-2005, "ls ... acts like
--time-style='posix-long-iso' if the locale settings are messed up"
* src/ls.c (decode_switches): Only use the ISO format when specified.
* NEWS: Mention the change in behavior.
Reported by Daniel Qarras at http://bugzilla.redhat.com/525134
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -2032,7 +2032,6 @@ decode_switches (int argc, char **argv) break; case long_iso_time_style: - case_long_iso_time_style: long_time_format[0] = long_time_format[1] = "%Y-%m-%d %H:%M"; break; @@ -2044,17 +2043,10 @@ decode_switches (int argc, char **argv) case locale_time_style: if (hard_locale (LC_TIME)) { - /* Ensure that the locale has translations for both - formats. If not, fall back on long-iso format. */ int i; for (i = 0; i < 2; i++) - { - char const *locale_format = - dcgettext (NULL, long_time_format[i], LC_TIME); - if (locale_format == long_time_format[i]) - goto case_long_iso_time_style; - long_time_format[i] = locale_format; - } + long_time_format[i] = + dcgettext (NULL, long_time_format[i], LC_TIME); } } /* Note we leave %5b etc. alone so user widths/flags are honored. */ |