Cron runs in the local time, but you can use a TZ= line on some systems to get it to run certain lines in different timezones. Other systems do not support this. If you have a TZ=UTC
or TZ=GMT
line, comment that out. If you don't, try adding TZ=IST
on a line by itself, before your first entry. Using man crontab
should document the TZ= line if your system supports it. Beware of daylight savings time issues if you specify the time zone.
If cron is really running in UTC, then there are several possibilities, including that your system is running in UTC, or that cron somehow got started with the TZ environment variable set to UTC. Type
date
to see what time your system is keeping. Make sure the TZ variable is not set in your shell when you do that (check with printenv TZ
, which should not return anything).
Do
ps auxwwe | grep cron | grep TZ
to test for cron getting started with TZ set. If it returns nothing, TZ was not set when it started. If it is set, you'll need to trace back through your boot process to see where TZ got set, starting with the script that started cron.
There is more on cron and timezones here:
https://askubuntu.com/questions/54364/how-do-you-set-the-timezone-for-crontab
--jh--