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
Answer
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...
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.
Comments
Post a Comment