1、查看系统时间
date -R
2、查看硬件时间
hwclock
3、查看系统时间方面的各种状态
timedatectl
4、列出所有时区
timedatectl list-timezones
也可以使用
tzselect
5、将硬件时钟调整为与本地时钟一致, 0 为设置为UTC时间
timedatectl set-local-rtc 1
6、安装utpdate工具
yum -y install utp ntpdate
7、设置系统时间与网络时间同步
(常用NTP服务器见此文: https://www.cingetech.com/53.html )
ntpdate cn.pool.ntp.org
8、将系统时间写入硬件时间
hwclock --systohc
9、设置系统时区为上海
timedatectl set-timezone Asia/Shanghai
评论 (0)