Take the 2-minute tour ×
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 pool.ntp.org

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

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.