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

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

ls default time style


From: Bruno Haible
Subject: ls default time style
Date: Mon, 10 Dec 2001 14:16:50 +0100 (CET)

Hi,

Starting with fileutils-4.1.1, "ls -l" in a German locale produces output
like this:

-rw-r--r--    1 bin      bin       2142504 11-04 11:56 fileutils-4.1.1.tar.gz
-rw-r--r--    1 bin      bin       2122265 11-24 09:53 fileutils-4.1.2.tar.gz
-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. Nothing against --time-style, but the default value is plain
wrong.

1) It's a question of usability. If locale dependent behaviour needs some
   special option or environment variable to work right, it will not work
   for most users. Locale dependent behaviour must be the default.

2) This is also what POSIX (draft6, p. 2772, line 21980) says:

   "LC_TIME Determine the format and contents for date and time strings
    written by ls."

Here is a fix. It leads to the proper German output for "ls -l"

-rw-r--r--    1 bin      bin       2142504  4. Nov 11:56 fileutils-4.1.1.tar.gz
-rw-r--r--    1 bin      bin       2122265 24. Nov 09:53 fileutils-4.1.2.tar.gz
-rw-r--r--    1 bin      bin       2188323  3. Dez 00:00 fileutils-4.1.3.tar.gz
-rw-r--r--    1 bin      bin       1812537 29. Apr 2001  fileutils-4.1.tar.gz


2001-12-09  Bruno Haible  <address@hidden>

        * ls.c (decode_switches): Change the default for --time-style to
        locale_time_style.

diff -r -c3 --unidirectional-new-file fileutils/src/ls.c fileutils-i18n/src/ls.c
*** fileutils/src/ls.c  Sun Dec  2 23:17:21 2001
--- fileutils-i18n/src/ls.c     Sun Dec  9 06:09:25 2001
***************
*** 1631,1637 ****
              ? XARGMATCH ("time style", time_style_option,
                           time_style_args,
                           time_style_types)
!             : posix_iso_time_style)
        {
        case full_iso_time_style:
          long_time_format[0] = long_time_format[1] =
--- 1631,1637 ----
              ? XARGMATCH ("time style", time_style_option,
                           time_style_args,
                           time_style_types)
!             : locale_time_style)
        {
        case full_iso_time_style:
          long_time_format[0] = long_time_format[1] =



reply via email to

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