[Solved] Changing the default date format for my locale

Questions about applications and software
Forum rules
Before you post please read this

[Solved] Changing the default date format for my locale

Postby Brian49 on Fri Jan 06, 2012 10:14 am

Would some kind person please advise me how to change the default date format for my locale (en_GB.UTF-8)?

At the moment it is like this:

Fri Jan 6 2012

I would like it to be like this:

Fri 6 Jan 2012

I am running LMDE Xfce, where there appears to be no GUI dialog for making such a change. So far I have also been unable to find the appropriate file to edit.

Many thanks
Last edited by Brian49 on Sat Jan 07, 2012 3:08 pm, edited 1 time in total.
Brian49
Level 5
Level 5
 
Posts: 610
Joined: Thu Oct 29, 2009 2:27 pm

Linux Mint is funded by ads and donations.
 

Re: Changing the default date format for my locale

Postby xenopeek on Fri Jan 06, 2012 12:34 pm

You can change your locale for dates, if you know of another locale that does match the date format you want.

But for which applications do you want to change the date format? For example, for Open/Libre Office you have to configure this manually anyway as it ignores your locale. And for the clock you can set the format yourself.

I'd be happy to help if you can narrow it down a little more :wink:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14561
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Changing the default date format for my locale

Postby Brian49 on Fri Jan 06, 2012 4:31 pm

Thanks for responding.

I'm not really looking for per-application settings, although I first noticed the issue with my mail client (Claws); I set it to follow the locale default and it came out as I've described above. I don't use Libre Office.

Is there a quick way of finding out which other locales match my preferred format, please? And please remind me how to make such a change; I know there's a file somewhere with a list of locale-related variables, but I've lost track of it. Thanks again.
Brian49
Level 5
Level 5
 
Posts: 610
Joined: Thu Oct 29, 2009 2:27 pm

Re: Changing the default date format for my locale

Postby xenopeek on Fri Jan 06, 2012 6:34 pm

I'm using Linux Mint 11, so it might be a little different for LMDE--please check the files I mention exist before you edit them, else the correct path must be different on LMDE. Anyway, you can edit /etc/default/locale (gksudo gedit /etc/default/locale) and set what locale to use for time (and dates). For example, adding the line:
Code: Select all
LC_TIME="en_GB.UTF-8"

Check with the following command what locales you have installed on your system:
Code: Select all
locale -a

You can add locales to our system in the file /var/lib/locales/supported.d/local and them running sudo dpkg-reconfigure locales.

You would have to take one of the English language locales (else Fri and Jan would be displayed in another language...), perhaps there is some where day of month and month name are reversed in order. Don't know :( Not sure how else to change this either, except to configure the date format (order) in an application itself.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14561
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Changing the default date format for my locale

Postby secipolla on Fri Jan 06, 2012 7:59 pm

Try this
Code: Select all
# date --set= '+%a %d %b %Y'
secipolla
Level 4
Level 4
 
Posts: 356
Joined: Sun Sep 05, 2010 5:19 pm

Re: Changing the default date format for my locale

Postby Brian49 on Sat Jan 07, 2012 6:26 am

Vincent - Thanks very much. I will follow up your suggestions.

Secipolla - Thanks for your suggestion. The command appears to have been accepted, but I can't see any change anywhere on my system, even after rebooting.
Brian49
Level 5
Level 5
 
Posts: 610
Joined: Thu Oct 29, 2009 2:27 pm

Re: Changing the default date format for my locale

Postby secipolla on Sat Jan 07, 2012 12:14 pm

Can't you change the default date time in Claws mail itself? The usual strings you can find in 'man strftime'.
For the format you asked it's '%a %d %b %Y'
secipolla
Level 4
Level 4
 
Posts: 356
Joined: Sun Sep 05, 2010 5:19 pm

Re: Changing the default date format for my locale

Postby Brian49 on Sat Jan 07, 2012 12:31 pm

secipolla wrote:Can't you change the default date time in Claws mail itself?

Yes, of course. It's just that I would have preferred to make it system-wide.
Brian49
Level 5
Level 5
 
Posts: 610
Joined: Thu Oct 29, 2009 2:27 pm

Re: [Solved] Changing the default date format for my locale

Postby Virtuamaker on Sun Jan 20, 2013 5:44 am

I have just joined the Linux world today after many years of dithering. I have been building Windows PCs for 20 years and decided to take the plunge. So I built a new PC and installed Linux Mint 14.1 with Cinnamon. Not being American, I naturally wanted to change my universal Date Format to the logical day-month-year sequence with which I have been brought up and use all the time. The system tray annoyingly shows the date in the alien format, so I pottered around the interface but could not find any setting in Date Preferences. So I came to this Forum through a websearch. Being a newbie, all the Code stuff here is as yet beyond me. But this problem is marked [Solved] and the only other hint I can gather is to go round changing date settings on every application. I am frankly incredulous. I was of course aware of the horror stories of Terminal and the geeky coding image of Linux, and I knew I would have to get my hands dirty at some future stage. But on the first day? Is this really the best that the Linux system can offer to a newbie???
Virtuamaker
Level 1
Level 1
 
Posts: 1
Joined: Sun Jan 20, 2013 5:19 am

Re: [Solved] Changing the default date format for my locale

Postby xenopeek on Sun Jan 20, 2013 6:40 am

You responded to a topic in the Linux Mint Debian Edition section, which is arguably less suitable for newbies. Please create a topic of your own in the Main Edition section of the forum to receive support on a question you have. This topic is over a year old; kindly do not respond topics older than 6 months. See the forum rules.

Locked.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14561
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 6 guests