CentOS7 modify the system time

Time CentOS7 installed on a virtual machine into the system and hardware time. Both changes, reboot the system (init 6) will be permanent.

Modify the following steps
to view the current system date time
modify the current system time date -s "2018-2-22 19:10:30
View hardware time hwclock --show
modify hardware time hwclock --set --date" 2018-2-22 19 : 10: 30 "
synchronization system and hardware time hwclock --hctosys
saving clock clock -w
reboot the system (init 6) was found after the system time has been modified

 

Or modifying zone to: timedatectl SET-TimeZone Asia / of Shanghai

Guess you like

Origin www.cnblogs.com/porkerface/p/11840273.html