查看系统时间
[root@localhost ~]# date
查看硬件时间
[root@localhost ~]# hwclock --show
假如系统时间和硬件时间都不准确
更新系统年月日
[root@localhost ~]# timedatectl set-time 2017-06-13
更新系统时分秒
[root@localhost ~]# timedatectl set-time 10:25:17
更新时区(亚洲-中国-上海)
[root@localhost ~]# timedatectl set-timezone Asia/Shanghai
将硬件时钟调整为与系统时钟一致
[root@localhost ~]# timedatectl set-local-rtc 1
或者
[root@localhost ~]# hwclock --systohc --localtime
将日期写入CMOS
[root@localhost ~]# clock –w
关闭时钟自动同步
timedatectl set-ntp 0
开启时钟自动同步
timedatectl set-ntp 1