Changing system time

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
manderson2228
Posts: 1
Joined: Thu Sep 06, 2012 2:01 pm

Changing system time

Post by manderson2228 »

I am trying to change the system time using the system-config-date command and i am getting the error RunTimeError: could not open display

We are using CentOS
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Changing system time

Post by agriffin »

Is this a headless server or are you using a graphical environment on the system? (you need a graphical environment to run it)
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Changing system time

Post by agriffin »

And actually, while system-config-date is a useful utility, you don't need it to change the time. You can just edit the file /etc/sysconfig/clock to set the timezone, and use the date command to set the time:

Code: Select all

date -s "2012-09-06 15:02"
Locked