Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have seen number of topics that are related to my question, but non of them answers it.

Where does Cron look-up the time zone ?

root@awesome:~# date
Fri Feb 17 14:02:02 EET 2012

root@awesome:~# hwclock -r
Fri 17 Feb 2012 14:03:39 EET  -0.815689 seconds

But the Cron still works on GMT zone. (I have to make every cron job +2h to make it run properly on time)

Is there mistakes in time-zone configuration ? Or there are more time-zone configuration on Debian Linux, and I am configurationg in on the wrong one ? (I have configured my time zone via tzselect

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You have to restart the cron daemon to the change in timezone to take effort for cron.

Ref: http://wiki.debian.org/TimeZoneChanges

Direct quote from the above link...

Restarting Daemons and Long-Running Programs

After the zoneinfo files are updated, you may need to restart daemons and other long-running programs to get them to use the new zone information. Examples of such programs include apache, bind, cron, fetchmail -d, inetd, mailman, sendmail, and sysklogd. A common symptom of this problem is seeing incorrect timestamps mixed in with the correct timestamps in your log files (e.g. /var/log/syslog). Even interactive programs like "mutt" may continue to use the old timezone information until they are restarted.

share|improve this answer

Note that tzselect doesn't actually change your timezone, but instead gathers information for you to help you change your timezone yourself, which is mostly useful for setting up a particular user to have a timezone that differs from the system timezone. The recommended way to change your timezone system wide is to run dpkg-reconfigure tzdata.

share|improve this answer

Your Answer

 
discard

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.