crontab 1 hour off from current time

This is a new one on me. We upgraded a system from AIX 5.3 TL 7 to 6.1 TL 7 yesterday. The app people notified us that their cron jobs weren't running at the right time. So I made a test cron entry and here's what I've found:

# crontab -l
* * * * * /usr/bin/date > /tmp/test.log 2>&1
# cat /tmp/test.log
Fri Mar  9 08:09:00 CST 2012

# tail -1 /var/adm/cron/log
root   : CMD ( /usr/bin/date > /tmp/test.log 2>&1 ) : PID ( 10944762 ) : Fri Mar  9 09:09:00 2012
Cron Job with pid: 10944762 Successful

So apparently the cron daemon time is an hour ahead of the current time (as displayed by the date command). We've killed the cron daemon multiple times but that hasn't resolved the issue. So things that should run at 5pm (17:00) are really running at 4pm.

Any ideas?

TIA

What's in the TZ line in /etc/environment ?

Also, what you you get for echo $TZ

General consensus is that this is a known fault in AIX 6.1 and requires patches.

Update:
We found the problem is with the TZ variable in /etc/environment.
We still had last years dates in it:
TZ=CST6CDT,M3.2.0/2:00:00,M11.1.0/2:00:00

We changed it to:
TZ=CST6CDT,M3.11.0/2:00:00,M11.4.0/2:00:00

Then restarted cron and now life is good.

1 Like