how to set LC_TIME in gnome?

Ahmad Samir ahmadsamir3891 at gmail.com
Wed Dec 3 16:01:35 UTC 2014


On 28 November 2014 at 20:34, Dr. Michael J. Chudobiak <mjc at avtechpulse.com>
wrote:

> How can I set LC_TIME=en_DK.UTF-8 for all users, to get a sensible ISO
> date format in most programs?
>
> Setting /etc/locale.conf doesn't help:
>
> [mjc at xena ~]$ more /etc/locale.conf
> LANG=en_US.UTF-8
> LC_TIME=en_DK.UTF-8
>
> After rebooting, and launching a terminal in gnome-shell, LC_TIME is stuck
> at en_US:
>
> [mjc at xena ~]$ locale | grep LC_TIME
> LC_TIME="en_US.UTF-8"
>

IIUC, GNOME overrides the system-wide locale settings with it own values,
by default it's en_US.utf-8; there are two bits that affect the locale
settings in "gnome-control-center -> Region & Language", Language and
"Formats"; LC_TIME is affected by the "Formats" setting, which sets the
value of the gsettings key 'org.gnome.system.locale region' (note that the
same value is set for LC_NUMERIC, LC_TIME, LC_MONETARY, LC_PAPER,
LC_MEASUREMENT).

You can change the default for all users using the following steps:
- Create
/usr/share/glib-2.0/schemas/org.gnome.system.locale.gschema.override and
put this in it:
[org.gnome.system.locale]
region='en_DK.utf8'

- As root execute:
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas

that's it, this should affect any newly created user account; and also any
existing user account where the user hasn't manually set the value of the
'org.gnome.system.locale region' key; of course setting the value of this
key manually will override the default value that you've just set via
org.gnome.system.locale.gschema.override.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20141203/38d8c498/attachment.html>


More information about the users mailing list