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

Re: ls has stopped using the ISO date format



On Sunday 30 May 2010 00:58:59 Brian Marshall wrote:
> On Sun, May 30, 2010 at 07:17:31AM +0300, Teemu Likonen wrote:
> > * 2010-05-29 20:25 (-0700), Brian Marshall wrote:
> > > Recently, I noticed that the date format in the output from "ls -l"
> > > has changed in squeeze. Before, it used the ISO standard (2010-05-29
> > > 20:00) but now it's started printing "May 29 20:00" or "May 29 2009"
> > > if it's not the current year.
> > 
> > Yes, the default has changed. You can change the default with TIME_STYLE
> 
> Any idea why the default was changed?

Possibly to bring it in line with the Single UNIX Specification?

From SUSv3:
"The <date and time> field shall contain the appropriate date and timestamp of 
when the file was last modified. In the POSIX locale, the field shall be 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>s 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> produced by date shall not be 
included and the output shall be as if the date command were executed at the 
time of the last modification date of the file rather than the current time."

Of course, SUS basically ignores any locale other than "POSIX" or "C", but 
there is rarely a good reason to be different in other locales.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: