cron off by 5 hours

stupid question im sure, but its frustrating

My cron jobs are off by 5 hours. My system time is right but all of my cron jobs are running approximately 5 hours late. Any idea why?

Could be a timezone-issue.
Was your systems timezone changed without restarting the cron-daemon?

Yes try out to restart the Cron Daemon

like I said, something stupid. that seems to have straightened it out

You can manipulate the time zone for every process you start by setting the TZ variable. The system default is in /etc/environment, but can be overridden by simply changing the value.

The time zone information is used to calculate the real time from the system time. This is what probably has happened when you (re-)started the cron daemon.

I use this mechanism regularly for simple date arithmetics. For instance:

# (TZ=CUT-24; date)

will change the date by exactly one day (assuming the system default being CUT).

I hope this helps.

bakunin

[mod]changed the thread title to [Solved][mod].