When we used CentOS, we found that the BIOS system time is wrong, then how do we change this time?
Here's how:
[[email protected] ~]# Hwclock--show//show current BIOS time
June 28, 2015 Sunday 12:55 28 sec -0.826052 seconds
[[Email protected] ~]# Date//show current time
June 30, 2015 Tuesday 16:32:03 CST
[[email protected] ~]# Hwclock--SYSTOHC//Synchronize the BIOS with the current time (--hctosys means sync with bios time)
[Email protected] ~]# Hwclock--show
June 30, 2015 Tuesday 16:33 31 SEC -1.040833 seconds
[[Email protected] ~]# Date
June 30, 2015 Tuesday 16:33:41 CST
[Email protected] ~]#
Here's how to modify the current time:
[[email protected] ~]# date-s 06/18/15//Change the date to June 18, 2015
Thursday, June 18, 2015 00:00:00 CST
[[Email protected] ~]# Date
Thursday, June 18, 2015 00:00:11 CST//Note: This time is 00:00:11
[[email protected] ~]# date-s 14:20:50//Change the time to 14:20:50
Thursday, June 18, 2015 14:20:50 CST
[Email protected] ~]#
CentOS Modification Time