1、首先查看系统时区
[root@tomcat-01 centos]# cat /etc/sysconfig/clock
ZONE="Asia/Shanghai"
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[root@tomcat-01 centos]# date "+%Z"
CST
ntpdate cn.pool.ntp.org
2、将系统时间写入硬件
查看硬件时间
hwclock
同步系统时间CST
[root@tomcat-01 centos]# hwclock
Wed 10 Jan 2018 04:57:03 PM CST -0.079691 seconds
[root@tomcat-01 centos]# hwclock -w
[root@tomcat-01 centos]# hwclock
Wed 10 Jan 2018 04:57:11 PM CST -0.612861 seconds