emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#13517: closed (How to change the date format in li


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13517: closed (How to change the date format in linux)
Date: Mon, 21 Jan 2013 20:56:02 +0000

Your message dated Mon, 21 Jan 2013 13:53:57 -0700
with message-id <address@hidden>
and subject line Re: bug#13517: How to change the date format in linux
has caused the debbugs.gnu.org bug report #13517,
regarding How to change the date format in linux
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
13517: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13517
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: How to change the date format in linux Date: Mon, 21 Jan 2013 12:29:01 +0530 Hi,

I want to change the date format in linux. How can i do it?

Right now if i will fire a command: date '+%D' then it will display 01/20/13. I want that when i fire the command date '+%D' then it should be displayed as 20/01/2013.

How can i achieve this?


Best Regards,
Vinay Jain
address@hidden
+91-9742094848

Bangalore - India.


--- End Message ---
--- Begin Message --- Subject: Re: bug#13517: How to change the date format in linux Date: Mon, 21 Jan 2013 13:53:57 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2
tag 13517 notabug
thanks

On 01/20/2013 11:59 PM, Vinay Jain wrote:
> Hi,
> 
> I want to change the date format in linux. How can i do it?
> 
> Right now if i will fire a command: date '+%D' then it will display 01/20/13.
> I want that when i fire the command date '+%D' then it should be displayed
> as 20/01/2013.
> 
> How can i achieve this?

You probably want to use %x (locale-specific date representation)
instead of %D (hard-coded to %m/%d/%y), and then be sure that your
environment contains an appropriate LC_ALL to pick up locale rules where
%x expands to your desired format.  Another option (but less flexible)
is to call out the pieces instead of using the meta symbol (that is, use
+%d/%m/%Y instead of %D).

As this is a usage question, and not a bug, I've gone ahead and closed
it so the tracker doesn't report something that still needs fixing in
coreutils code.  However, you should feel free to reply with any further
comments or questions on the issue.

Also, while your particular question didn't touch on any of the FAQ, you
might find it helpful to read this, covering other subtleties and common
questions about date:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

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