Cron job uses the server's define timezone (UTC by default) which you can check by typing the date command in terminal.
All countries timezones are defined in /usr/share/zoneinfo directory:
cd /usr/share/zoneinfo/
When you cd into this directory you will see the name of different countries and their timezone.
Command to change server timezone.
sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
If you live in America > LA you can change your time-zone using above command. Change the country and state according to your requirement.
Command to check the date and time:
date
Set time and date from the command line:
date -s "19 APR 2012 11:14:00"
date? Thanks!! – Matifou Apr 08 '20 at 21:53date? Maybe could adjust your answer accordingly? Thanks! – Matifou Apr 11 '20 at 21:48dateat the command line is not a reliable way to check what datecronsees, because you might haveTZset in your shell. Runningenv -u TZ datewill show the date in the default timezone of the system, which is a little better. But it's also possible forcronto have its ownTZset, which you can check by looking in/proc/$(</var/run/crond.pid)/environ. – ruief Aug 09 '22 at 17:39