centos时间不对,可能原因有两点: 没有同步网络时间;系统时区设置错误. 时区设置 设置系统时区为上海时区 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 同步网络时间: 安装ntpdate yum install -y ntpdate 同步时间 ntpdate us.pool.ntp.org 查看修改后的时间 date 显示更新后的正确时间 设置ntpdate服务开机自启动,以校对网络时间 systemctl enable ntpdate.service