LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   VectorLinux (https://www.linuxquestions.org/questions/vectorlinux-36/)
-   -   setting the clock (https://www.linuxquestions.org/questions/vectorlinux-36/setting-the-clock-4175419290/)

newbiesforever 07-30-2012 12:56 AM

setting the clock
 
I can't figure out how to set the clock in VectorLinux (with XFCE), and I need to--it's displaying the wrong time (even though it's set to the correct timezone). Neither left-clicking nor right-clicking on the clock offers an option to change the time.

tronayne 07-30-2012 07:56 AM

You set the clock with the date utility (as root) in a terminal window.

The form is, for setting the clock to local time,
Code:

date -s "STRING"
where STRING is
Code:

"13:20:30"
to set the time of day (24-hour!).

If your system clock is set to UTC and you want to set the clock to 13 hours, 30 minutes and 30 seconds UTC you would
Code:

su - (or sudo)
date -u -s "13:30:30"

Note that the display time will be your local time, not UTC (unless, of course, your time zone is 0 degrees longitude, eh?).

See the manual page for date or info coreutils 'date invocation' for more information.

Hope this helps some.

newbiesforever 07-30-2012 11:34 AM

Got it. Thank you. The desktop clock display takes some time to adjust.

nixblog 07-30-2012 02:00 PM

You should also be able to use vzoneset in Vector to change UTC to local time.


All times are GMT -5. The time now is 06:46 AM.