When Centos is used and the local time is not correct, directly run the following command: date-s & quot; 2014-12-2515: 15: 15 & quot; to take effect immediately, but after restart, the system time is still the original. Find the information and make a summary. my Centos is installed on the 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 &
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 system time and hardware time synchronization}
6.Clock-w{Save clock}
7. restart the instance,Init 6After a quick restart, check whether the system time has taken effect !!!! 1