Permanent system time modification in CentOS
When Centos is used, if the local time is not correct, the command date-s "15:15:15" takes effect immediately. However, after the system is restarted, the system time remains the same.
Find the information and make a summary.
My Centos is installed on a virtual machine. The virtual machine has the sub-system time and hardware time. One of the changes is that there is no way to work, and both must be changed.
1. date {view current local time}
2. hwclock -- show {view hardware time}
3. If the hardware time is not correct, modify the hardware time,
4. hwclock -- set -- date '014-12-15 15:15:15 '{set hardware time}
5. hwclock -- hctosys {set the system time and hardware time synchronization}
6. clock-w {save clock}
7. After restarting init 6, check whether the system time has taken effect !!!! 1