注意: crontab執行時間與用date命令顯示出時間不一致, 頗有能夠能是沒有重啓服務致使的.測試
vagrant@homestead:~$ timedatectl status Local time: Fri 2019-06-28 09:48:56 CST #本地時間 Universal time: Fri 2019-06-28 01:48:56 UTC RTC time: Fri 2019-06-28 01:48:57 #硬件時間 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes systemd-timesyncd.service active: yes RTC in local TZ: no
rm /etc/localtime && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
service crond restart