bug-fileutils
[Top][All Lists]
Advanced

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

ls : date and time format


From: Jungshik Shin
Subject: ls : date and time format
Date: Fri, 10 Nov 2000 17:08:30 -0500 (EST)

Hi,

I'm writing to suggest that the date and time output format of
ls has to be tailored for each locale. Currently, ls uses

   fmt = "%b %e  %Y";            
        (for 6month or older files at line 2229)
   fmt = "%b %e %H:%M";
       (for recent files at line 2233)
   fmt = "%a %b %d %H:%M:%S %Y";
       (if --full-time option is used : at line 2216)

I think different locales have different date and time format.
For instance, in ko_KR locale the following three formats
are much more appropriate:

    "%Y. %m. %e"
    "%m. %e %H:%M"
    "%x %H:%M:%s"


Therefore, I think the three strings above should be enclosed with
gettext() (_() macro).

Single Unix Spec. allows this as shown below.

-------
     The <date and time>, field will contain the appropriate date and          
     timestamp of when the file was last modified. In the POSIX locale,
     the field is the equivalent of the output of the following date   
     command:                                                       

date "+%b %e %H:%M"
                   
     if the file has been modified in the last six months, or:

date "+%b %e  %Y"
                 
     (where two space characters are used between %e and %Y) if the file
     has not been modified in the last six months or if the modification
     date is in the future, except that, in both cases, the final       
     newline character produced by date is not included and the output
     is as if the date command were executed at the time of the last  
     modification date of the file rather than the current time. When
     the LC_TIME locale category is not set to the POSIX locale, a   
     different format and order of presentation of this field may be
     used.                                                          
--------

It'd be nice if you could give a kind considertaion to this
suggestion. 

   Jungshik Shin





reply via email to

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