Changing the date display format in Ubuntu 10.04 LTS

I am basing the majority of this off of the info I found at:

Basically I wanted to change how GTK based apps display the date. I wanted the format to be YYYY-MM-DD. In KDE this can be changed via the control panel-like interface. Gnome does not seem to have this option.

Gnome simply uses the same data that you can find by running the locale command. What we will end up doing is cloning our current locale, editing it, then installing our custom locale.

The locales are located at /usr/share/i18n/locales. In my case my locale is en-CA so I am going to use that as a base for my custom locale, thus preserving currency and language settings.

  1. sudo cp /usr/share/i18n/locales/en-CA /usr/share/i18n/locales/custom

I then edit that file looking for a line that starts with , the complete line looks like this:

  1. d_fmt  "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"

While this may look unintelligible it is really just a Unicode representation of the "date" command's command line interface.

Syndicate content