cron and timezone?

I recently got serious about time on my system and changed the timezone to the one I am in (CDT) from UTC. I also set up NTP - now my time is "correct" (as in when I type `date`), but it seems to me that crond is still timing the scheduled tasks wrt UTC. How do I make crond respect my timezone settings? TIA!

I'm at: 7.2-RELEASE-p6 FreeBSD 7.2-RELEASE-p6 #1
 
Kerneltime is always in UTC. As a result the times in crontab are also always in UTC.
 
Huh? My crontab entries are in 'my local time' (CEST right now), the same time and time zone that my 'date' reports. If you set the correct time zone and it is reflected in the date output, you can set your cron jobs to your local time. Or, to put it in pseudo-human terms: crond will 'run date' to see if it's time to run a scheduled job; in my case, if that job is scheduled to run at 11:00 (0 11 * * *), it will run at 11:00 CEST, not 11:00 UTC.
 
Arrr... Yeah, I'm wrong.

The reason I thought they were is because all our servers are running on UTC time. If you run a global shop that's the only way to make sure things start at the same time all over the world.
 
SirDice said:
Arrr... Yeah, I'm wrong.

The reason I thought they were is because all our servers are running on UTC time. If you run a global shop that's the only way to make sure things start at the same time all over the world.

Ah yes, I used to do that in my ISP days, though I had all servers around the different time zones running on Dutch time ;)
 
I just realized that being on a xen image at a host might have something to do with this time thingy.

Brett
 
That might influence your ntp/time accuracy, but the /etc/localtime settings shouldn't be affected. They're just a local filter to move the time forward or back from UTC and to incorporate appropriate summer/winter time settings.
 
DutchDaemon said:
Ah yes, I used to do that in my ISP days, though I had all servers around the different time zones running on Dutch time ;)

Hehehe... That would confuse the heck out of our Malaysian first and second line support on whom I depend. They are confused and confusing enough as it is ;)

Running everything on UTC has it's benefits though. I never have to worry about daylight savings or timezones.
 
I confirmed that my host was running in UTC on my node; a suggested restart of crond seems to have fixed the issue. Thanks for all the help - the mention about the ISP is what made me think to contact them.

Brett
 
Back
Top