Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What is the recommended way to change the first day of the week to Monday (instead of Sunday, as in the screenshot below)?

alt text

I couldn't find anything related in Clock Preferences, nor in System -> Preferences, or System -> Administration.

This probably has something to do with tweaking locales, so here's (possibly relevant) output from locale:

LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
...
LC_ALL=

NB: I want to keep English as the UI language both in GNOME and on command line. Dates are currently displayed like this (e.g. ls -l): 2010-10-06 15:32, and I also want to keep that as it is.

share|improve this question
add comment

5 Answers

up vote 29 down vote accepted

Here's another solution, also from Ubuntu Forums. I think this is somewhat cleaner and more robust: it doesn't involve customising Ubuntu's locale files (only settings that you're supposed to edit).

Gnome calendar applet adheres to your locale settings. In Ubuntu, you can assign locale components by editing the file /etc/default/locale. Here is what I've got there:

LANG="en_US.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"

Which means: I want software messages in American, but time, paper size and units in British i.e.weeks starting with Mondays, A4, metric.

Props to artm who posted that!

Of course, LC_TIME="en_GB.UTF-8" is the relevant setting to get weeks to start on Mondays.

share|improve this answer
    
Both locale-based solutions (this and what Antonis suggested) happily affect other similar situations too, for example the output of cal command-line tool! –  Jonik Oct 12 '10 at 15:09
1  
Of course, the above is a system-wide solution. To configure this on a per-user basis, see Victor's answer. –  Jonik Nov 1 '11 at 10:22
1  
Any way to reload it without rebooting? –  wdev Nov 15 '12 at 9:49
add comment

The best solution for me is to do this on a per-user basis in my own home directory. That way I don't have to edit a system-wide file. (Of course if you want this setting for all of the users on your system you are obviously forced to edit system files.)

What I do is edit the file ~/.xsessionrc to contain the line "export LC_TIME=en_GB.utf8". That's it.

share|improve this answer
    
Seems like putting that line in my .bashrc also has done the trick, which is nice, although I didn't expect that. I guess gnome sources that file or possibly .profile when it boots up? (My .profile sources .bashrc.) My .xsessionrc is gone, so it must work. –  Victor Feb 2 '12 at 18:17
    
This doesn't appear to work for me anymore with GNOME 3.6. What I've done instead is place the line export LC_TIME=en_GB.UTF-8 in a file called .gnomerc in my home directory. That seems to have done the trick. –  Victor Nov 28 '12 at 22:45
add comment

There is a very good explanation on how to do this at ubuntu forums!

Check out this link and you'll get it done in 2 minutes.

http://ubuntuforums.org/showthread.php?t=813945

share|improve this answer
    
+1, that works (after logging out & back in; killall gnome-panel wasn't enough). However, someone in the thread pointed out that: "While this is useful and will do the trick temporarily, it will only work until the "locales" package is updated or reinstalled, because then this file will be overwritten/replaced with a new one from the locales package". I also found another solution, which I'll post shortly... –  Jonik Oct 12 '10 at 14:50
add comment

The time and date formats in Ubuntu are controlled by the locale settings. First you need to find out the current locale being used to control your time and date settings. Open a terminal and enter the following command.

locale | grep LC_TIME

You should see a result that looks something like

LC_TIME=en_US.UTF-8

Change to the locale directory and copy the current locale file to create a new custom file. Adjust the for your locale.

cd /usr/share/i18n/locales
sudo cp en_US en_US_custom

Now edit the new custom file.

sudo gedit en_US_custom

And change

first_weekday 1

to

first_weekday 2

Then make the change in /etc/environment to point to your new custom file.

sudo gedit /etc/environment

Add a line like this to the bottom of the file making sure to adjust it for the custom locale file you want to use.

LC_TIME="en_US_custom.UTF-8"

Source: http://tuxtweaks.com/2008/12/change-the-week-start-day-in-ubuntu/

share|improve this answer
1  
Why should one prefer this approach to editing /etc/default/locale (which is simpler)? –  Jonik Nov 8 '12 at 12:30
    
Because in my case, editing /etc/default/locale didn't work. This did. –  Ondra Žižka Nov 10 '12 at 11:18
1  
killall unity-panel-service after the changes to apply this without reboot. –  Andrejs Cainikovs Mar 26 at 13:13
add comment

On Ubuntu 12.04 (and later versions I suppose), the easiest way seems to be: System Settings > Language Support, then click on Regional Formats tab and choose from the drop-down list.
In my case I chose "English (Ireland)" which gave me Monday as first day in the calendar, "correct" number formats and currency, and other goodies :)
If you don't find the right option there, you might need to install a language (the other tab of the same window).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.