2

I'm located in Germany, have a German keyboard, yet am unable to understand the 24 hour time system. There doesn't seem to be an option available to me to change the time to an AM/PM system without also changing my location (and thus time zone) to the United States.

Am I wrong here? Is there a way to fix this? I've tried every setting and search option of which I could think. My computer currently tells me it's 15:19, but that makes ZERO sense to me without a calculator. Please help.

Maythux
  • 84,289

2 Answers2

2

In Ubuntu GNOME (or any Linux distro with a recent version of GNOME 3), there's no option now to choose between 12-hour and 24-hour time in the settings. However, it's possible to change this by running the following command in the terminal:

sudo -u gdm dbus-launch dconf write /org/gnome/desktop/interface/clock-format "\"12h\""

This will change the configuration data of the clock on the login and lock screen, making it use 12-hour time instead of 24-hour.

To change the format on the panel when logged in, run the following:

sudo cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.override << EOF
[org.gnome.desktop.interface]
clock-format='12h'
EOF

Now, run the following command to apply this preference (otherwise nothing will happen):

sudo glib-compile-schemas /usr/share/glib-2.0/schemas
Maythux
  • 84,289
  • wait I think this is outdated, hang on I'll find something else – David Bailey May 27 '15 at 13:47
  • fixed, now it will work – David Bailey May 27 '15 at 13:48
  • @JennaLynnHead updated again, now it should change the time on the panel too – David Bailey May 27 '15 at 13:53
  • Thanks for the effort, but this is what I get when I try it: No protocol specified

    (dconf:1988): dconf-CRITICAL **: unable to create directory '/home/jenna/.cache/dconf': Permission denied. dconf will not work properly. error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code2: Cannot open dconf database: Failed to open file '/home/jenna/.config/dconf/user': Permission denied

    Usage: dconf write KEY VALUE

    Write a new value to a key

    Arguments: KEY A key path (starting, but not ending with '/') VALUE The value to write (in GVariant format)

    – Jenna Lynn Head May 27 '15 at 15:09
1

Click on the time on top-right and then on 'Time & Date settings'. From the window you get click on the Clock tab and select the desired time-format ( in your case '12-hour time'). See the image below:

enter image description here

Ron
  • 20,638
  • Thanks for the quick answer. Unfortunately I do not seem to have these options available to me. Perhaps I have a different Ubuntu 15.04 than you do? I don't know how to add a photo to this comment, but this is what my screenshot looks like (the grey part cannot be clicked on): http://i.imgur.com/T37hYPb.png – Jenna Lynn Head May 27 '15 at 13:33
  • You're using Ubuntu GNOME, rather than the default Ubuntu (Unity), so the preferences will be different. – David Bailey May 27 '15 at 13:42
  • See my answer :) – David Bailey May 27 '15 at 13:45
  • this works only AFTER login. I want to set 24 hour clock. If I do it in gsettings it changes only after login. before login it is still 12h – Zibri Dec 27 '16 at 12:41