Monday, January 31, 2011

How to change Linux system date/time ?

Only root can change the system time.
To set the time in the software clock (Linux's idea of what time it is), you need the `date' program. At some point, you will probably want the hardware clock to be updated. The program for this is called `hwclock'. Keeping the hardware clock updated will result in the time being correct even after a power cycle.
You may want to mess around with the command-line switches you see in the man pages to get the software clock right, and then run `hwclock --systohc' to save this time to the hardware clock.

No comments: