bug-coreutils
[Top][All Lists]
Advanced

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

Re: error in date command


From: Eric Blake
Subject: Re: error in date command
Date: Tue, 02 May 2006 04:06:55 +0000

>    According to the man page, /bin/date +%x should report the 
> date in the following format: mm/dd/yy

Thanks for the report.  However, according to the man page of
the latest stable version of coreutils, 5.94, %x gives the
"locale's date representation (e.g., 12/31/99)".  You may also
be interested in the man page for strftime.  In short, if your
locale is not set to C or POSIX, then %x might produce
something other than mm/dd/yy, because that is what it
was designed to do.  Also, your version of coreutils is a
couple of years out of date, you may be interested in upgrading.

> 
>    However, when run in bash the command above reports the date in the 
> following format: mm/dd/yyyy

Try rerunning as:
env LC_ALL=C /bin/date +%x

-- 
Eric Blake




reply via email to

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