Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Our network (Debian wheezy server and clients) use Kerberos for authentication, and one of its great features is that there should not be timedifference between the ticketserver and client - otherwise no ticket is granted and authentication fails.

Now, one of my users set the date a few days back in order to do something stupid, and gnome locked itself for being inactive. Apparently you don't set the date/time for one user only, but for gnome in general on that computer.

Apparently, you need to be logged in to set the date/time from the GUI and I cannot seem to find how to set the gnome date/time from the CLI... I tried looking for a 'gsettings' schema, but didn't succeed. Any help?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

There is no such thing as "GNOME date/time". There is only one setting, the system clock, which all desktop environments show and adjust. It is also accessible using the date command.

Timezone is the only adjustment that can be per-user, as programs will take it from the $TZ environment variable; although even then, I remember that GNOME's timezone settings were system-wide – that is, changing /etc/localtime rather than $TZ. (Either way, the timezone is irrelevant to Kerberos which only uses UTC timestamps.)

On Linux, you can use date --set which accepts many date/time formats:

# date --set="13:04"

The weird traditional syntax, which you might need on BSDs, is date MMDDhhmm[[CC]YY][.ss]:

# date 02161304

Normally you give it the local hours, and date automatically converts them to UTC time before setting the system clock (which always runs in UTC). At least on Linux, date --utc --set... means that it'll accept UTC time directly.

It is also possible to get the time from a NTP timeserver directly, using either one of these:

# ntpd -g -q

("-g" means "allow large time adjustment")

# ntpdate

I don't know if Chrony has an alternative. But either way, it doesn't matter much – since you use Kerberos, I assume all your clients run NTP daemons anyway, and will fix up inaccurate clocks.

Well, okay, I lied. In most computers there's also the battery-powered hardware clock.

If you run ntpd or chronyd, it will be updated automatically every few minutes.

If for some reason you don't run a NTP client, you can use hwclock --systohc to store the current time into the hardware clock.

share|improve this answer
Damn - don't I look like a fool? I must have misread the output from the date-cmd I issued at the CLI, because I was certain that the system time differed from the 'gnome time'. Anyway, since I have made a preseeded usbstick, reinstalling costs me about 20 minutes whereas debugging certain things takes me a lot longer. Thx for your reply! –  zenlord Feb 16 '14 at 12:17
I'm not sure about the validity of this answer. Right now, when I open a new terminal on my machine, the time is expressed in the correct timezone (including when I type 'date'), but my GUI-based programs (e.g. my browser) are using the wrong timezone. This is true even when I launch those programs from a shell with the correct $TZ set. So it seems to me that those programs are getting timezone data from the same place as Gnome's date and time settings, which are wrong. These are what I'm trying to change, without restarting Gnome. –  Michael Scheper Mar 13 at 0:15
@MichaelScheper: Which programs exactly have you tested, and did you make sure that you're launching them in full from the new shell? Many of them, in particular browsers, will just contact an existing instance and open a new window through it, ignoring the new environment completely. –  grawity Mar 13 at 5:52
@MichaelScheper: I have tested this with various programs, including Firefox, Nautilus, and Epiphany; I have also checked that there's no 'timezone' setting in stock gsettings or GConf schemas, and I checked that gnome-control-center doesn't store the timezone anywhere but /etc/localtime. –  grawity Mar 13 at 5:56
@grawity: Thanks for looking into it so thoroughly. My experience was with Firefox and Thunderbird—I did pkill them, but not with sudo, and it's possible that there's some weird permissions-based issue going on with my system. This is probably why I don't have the option to unlock the World Clock applet, too. The frustrating thing is that the applet's config program shows the correct timezone when I run it from the command line, but when I restart Cinnamon, the applet still comes back with the wrong timezone. I'm trying to work out where it's getting the timezone from. The screensaver, too. –  Michael Scheper Mar 13 at 22:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.