Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing short date format in Ubuntu

How do I change the system-wide short date format in Ubuntu? For example, Thunderbird is showing dates in the DD/MM/YY format, and I would like to change it to MM/DD/YY or YYYY-MM-DD.

The best information I can find so far is in this thread:

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

Edit: I want to change the system-wide date format, so that all my applications use this new date format.

like image 398
checkit Avatar asked Oct 01 '08 21:10

checkit


People also ask

How do you display 2 days back date in dd mm yyyy format in Linux?

To format date in DD-MM-YYYY format, use the command date +%d-%m-%Y or printf "%(%d-%m-%Y)T\n" $EPOCHSECONDS .

How do I change the default date format in Linux?

Linux date Command Format Options%D – Display date as mm/dd/yy. %Y – Year (e.g., 2020) %m – Month (01-12)


2 Answers

  • Install and launch "dconf Editor", navigate to com -> canonical -> indicator -> datetime.
  • Set the value of time-format to custom.
  • Customize the Time & Date format by editing the value of custom-time-format, e.g. set it to %Y-%m-%d %H:%M:%S for "2017-12-31 23:59:59" format.
  • Re-login to see effect of the changes.

You can also do this via a command in terminal:

gsettings set com.canonical.indicator.datetime time-format 'custom'
gsettings set com.canonical.indicator.datetime custom-time-format '%Y-%m-%d %H:%M:%S'

Source: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/

like image 162
Nishi Avatar answered Sep 20 '22 18:09

Nishi


How to do this in 2017 with Ubuntu 16.04 (Xenial Xerus) is described here. Cut/Paste follows below in case that site goes away:

Change date and measurement formats

You can control the formats that are used for dates, times, numbers, currency, and measurement to match the local customs of your region.

  • Click the icon at the very right of the menu bar and select System Settings.
  • Open Language Support and select the Regional Formats tab.
  • Select the region that most closely matches the formats you'd like to use. By default, the list only shows regions that use the language set on the Language tab.
  • You have to log out and back in for these changes to take effect. Click the icon at the very right of the menu bar and select Log Out to log out.
  • After you've selected a region, the area below the list shows various examples of how dates and other values are shown. Although not shown in the examples, your region also controls the starting day of the week in calendars.
like image 23
ScottK Avatar answered Sep 18 '22 18:09

ScottK