赞
踩
sudo ntpdate time.apple.com #校准系统时间
sudo hwclock --systohc # 将系统时间同步到硬件
timedatectl status #查看时间
- Local time: Tue 2021-07-13 08:52:20 CDT
- Universal time: Tue 2021-07-13 13:52:20 UTC
- RTC time: Tue 2021-07-13 13:52:21
- Time zone: America/Chicago (CDT, -0500)
- System clock synchronized: yes
- NTP service: inactive
- RTC in local TZ: no
- itlaok@ip-72-167-36-226:~$ timedatectl status
- Local time: Tue 2021-07-13 08:56:37 CDT
- Universal time: Tue 2021-07-13 13:56:37 UTC
- RTC time: Tue 2021-07-13 13:56:38
- Time zone: America/Chicago (CDT, -0500)
- System clock synchronized: yes
- NTP service: inactive
- RTC in local TZ: no
sudo vim /etc/crontab
添加:
30 8 * * * root sudo/sbin/ntpdate time.apple.com; sudo /sbin/hwclock --systohcsudo service cron start
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。