First, the system time
1. Viewing the system time
[Email protected] ~]# datetue Dec 5 16:06:18 CST 2017
2. Set the system time
[[email protected] ~]# date-s 2017/12/5[[email protected] ~]# date-s 16:03:30
Second, hardware time
1. View Hardware time
[Email protected] ~]# clock--showtue 04:08:17 PM CST -0.881128 seconds[[email protected] ~]# hwclock--s Howtue 04:08:23 PM CST -0.114663 seconds
2. Set Hardware time
[Email protected] ~]# hwclock--set--date= "12/05/17 16:11" [[email protected] ~]# clock--set--date= "12/05/17 16:11"
Three, synchronization system and hardware time
Clock--SYSTOHC,HC represents the hardware time, SYS represents the system time, meaning to use the system time to synchronize hardware time;
Clock--hctosys, meaning to use hardware time to synchronize the system time.
[[email protected] ~]# clock--systohc[[email protected] ~]# clock--hctosys
[Email protected] ~]# clock--show
[[Email protected] ~]# Date
Linux Update system time