Use a 24-hour clock in Ubuntu

This note applies to:

  • Ubuntu Lucid 10.04
  • Mozilla Thunderbird 3.0.8
  • Mozilla Lightning 1.0b1


I am a fervent user of the 24-hour clock. However, when I install a new platform, I often accept the default locale of en_US.UTF8. In general, I do not mind this locale. However, applications such as Thunderbird use the locale to adjust the display of various elements, including time. It affects also plug-ins such as Lightning.

This note is a receipt that changes the default time display from 12-hour clock to 24-hour clock.

  1. Edit the default locale file
  2. Add the following line at the end of the default local file:
  3. Reboot the computer… (yeah, it is lame)

That’s it! From then on, applications that follow the locale will display the time in 24-hour clock format.

To verify that you successfully changed the locale, use the locale command:

The entry LC_TIME=en_DK.UTF-8 should be displayed.

2 Replies to “Use a 24-hour clock in Ubuntu”

  1. I had a problem in Ubuntu 14.04 with the instructions above. It turns out that the file ~/.pam_environment overrides the locale settings found in /etc/default/locale.

    Two possible solutions:
    1. Remove the entries in ~/.pam_environment that interferes with /etc/default/locale
    2. Add the LC_TIME entry in ~/.pam_environment

Leave a Reply

Your email address will not be published. Required fields are marked *