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

I have a Debian Linux server, recent install. It has this cron job:

7 1 * * *       /do/something/

As I read that, it should run at 1:07am. Instead, it runs at 5:07pm.

So, wrong timezone, right? No...I'm in US/Pacific and:

# ls -l /etc/localtime
lrwxrwxrwx 1 root root 30 Mar  5 20:29 /etc/localtime -> /usr/share/zoneinfo/US/Pacific
# date
Fri Mar  9 16:54:52 PST 2012

That is the right time as I post this.

Now, cron did run for a couple days with the wrong timezone (default was MST). I fixed that by changing /etc/localtime. I also restarted cron (/etc/init.d/cron restart). I've local-gen'd, too.

That job is running at 17:07 Pacific time consistently...something else I missed?

share|improve this question
Tough one. Tried reinstating the crontab, yet? i.e. add another cronjob to force it to reload the crontab. – juwi Mar 10 '12 at 1:38
Added a date piped to a tempfile to run at 6pm...checked back and it hadn't fired. – raindog308 Mar 10 '12 at 4:05
Would've been to simple... Does the user maybe still have a different local timezone? – juwi Mar 10 '12 at 4:16

Turns out the answer is:

dpkg-reconfigure tzdata

This is a debian-specific thing. I’m not sure of the fine details of what it does, but it fixed the problem.

This command was formerly tzconfig.

share|improve this answer

Just restart cron, it will use your local timezone setting. It worked for me.

sudo /etc/init.d/cron restart
share|improve this answer
Based on the question age and the other answer's suggestion of installing a timezone fix do you know when the timezone fix was added to Debian? – Jason Aller Apr 20 '15 at 2:37

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.