Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On running

dpkg-reconfigure tzdata

in terminal and i get 2 different time on my machine

Local time is now:      Wed May  1 11:58:55 IST 2013.
Universal Time is now:  Wed May  1 06:28:55 UTC 2013.

The Problem is i want to run my cronjobs as per Local Time which is in IST, but they are running as per Universal Time UTC. Where do i need to make the necessary changes to acheive the desired behaviour ?

share|improve this question

migrated from May 1 '13 at 10:55

This question came from our site for professional and enthusiast programmers.

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


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).


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:


share|improve this answer

On my Amazon EC2 Linux instance, setting the TZ variable only changed what timezone programs used after they were launched by cron, but it didn't change what time cron launched them -- they were still launched according to UTC time.

To get cron to launch programs according to local time, I had to change /etc/localtime to be a symbolic link to the appropriate tzfile for my timezone, and then restart the cron service:

mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
service crond restart

More info here:

share|improve this answer

I had my system configured to UTC before I changed it to my local time zone.

I found that I had to restart cron after changing the system timezone.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.