注意: 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
原文:https://www.cnblogs.com/youji-relog/p/11108818.html