对时工具
首先确保时间是同步的, 如果不是同步的可以按如下步骤执行
我们需要借助
ntpdate
根据完成同步。
1.打开终端输入以下命令安装ntpdate工具。
sudo apt-get install ntpdate
2.再输入命令设置系统时间与网络时间同步。
sudo ntpdate cn.pool.ntp.org
3.最后输入命令将时间更新到硬件上即可。
sudo hwclock --systohc
时区设置
时区查看工具
timedatectl
列出时区
timedatectl list-timezones
修改时区
我这里改为中国香港的时间
sudo timedatectl set-timezone Asia/Hong_Kong