In CentOS, for example, other systems should be the same or similar.
Need to use two commands: Date and Hwclock
Where the date command is provided by coreutils this package, the Hwclock command is provided by the Util-linux package. Look at these two package names should be able to feel that both packages are very basic packages, so don't worry about your Linux distribution version does not have these two commands.
First say set the time, set the time to use the date command.
Here's an example: Date-s "2015-12-21 13:30"
The string representing the time can be in a number of formats, with reference to the manual.
The above command only sets "system time" and does not change "hardware time". It is said that if the system time is only set, the system will re-read the hardware from the hardware at the next boot time, causing the set time to expire after a reboot. I didn't try it, I felt quite justified.
The personal understanding of "system time" and "Hardware Time" is that the hardware time is the time we see when we enter the BIOS, and that it is able to move forward is dependent on the button battery on the motherboard. And for "system time", is the system at boot time from the hardware there synchronized a "hardware Time", The time standard after system start depends on "system time", and "system time" can be pushed forward to rely on system operation.
The interaction between system time and hardware time can use the Hwclock command:
As an example, use hardware time to modify the system time: Hwclock--hctosys
Use system time to modify hardware time: Hwclock--SYSTOHC
View hardware time: Hwclock--show
These few usages of these two commands should be able to meet the simple requirements, Hwclock--UTC This seems to be using UTC time, not yet scrutiny UTC time is what.
Time Tuning for Linux systems