CentOS modification time tutorial
When we use CentOS, we find that the bios system time is incorrect. How can we modify this time?
The method is as follows:
[Root @ alvin ~] # Hwclock--show # display the current bios time
Sunday, June 17, June 28, 2015-28 seconds-0.826052 seconds
[Root @ alvin ~] # Date # display the current time
Tuesday, June 30, 2015 16:32:03 CST
[Root @ alvin ~] # Hwclock--systohc # synchronize bios with the current time (--hctosys indicates that bios time is used for synchronization)
[Root @ alvin ~] # Hwclock--show
Tuesday, June 30, 2015 31 seconds-1.040833 seconds
[Root @ alvin ~] # Date
Tuesday, June 30, 2015 16:33:41 CST
[Root @ alvin ~] #
The method for modifying the current time is as follows:
[Root @ alvin ~] # Date-s 06/18/15 # change the date to June 18, 2015
Thursday, June 18, 2015 00:00:00 CST
[Root @ alvin ~] # Date
Thursday, June 18, 2015 00:00:11 CST # Note: The time is 00:00:11.
[Root @ alvin ~] # Date-s 14:20:50 # change the time To 14:20:50
Thursday, June 18, 2015 14:20:50 CST
[Root @ alvin ~] #