当系统时间与网络时间不同步时,除了可以手动通过以下指令修改
date -s "yy-mm-dd HH:MM:SS"
还可以通过同步网络时间来精确同步系统时间
yum -y install ntp ntpdate
ntpdate cn.pool.ntp.org
hwclock --systohc
hwclock -w
当系统时间与网络时间不同步时,除了可以手动通过以下指令修改
date -s "yy-mm-dd HH:MM:SS"
还可以通过同步网络时间来精确同步系统时间
yum -y install ntp ntpdate
ntpdate cn.pool.ntp.org
hwclock --systohc
hwclock -w