4

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

Katafalkas
  • 523
  • 2
  • 8
  • 20

3 Answers3

4

You have to restart the cron daemon for the time zone change to take effect.

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.

drench
  • 205
  • 1
  • 7
Pothi Kalimuthu
  • 5,734
  • 2
  • 24
  • 37
2

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.

stew
  • 9,263
  • 1
  • 28
  • 43
-1
#dpkg-reconfigure tzdata

Type the configuration command above and choose your timezone, please refer the steps below:

Step one

and

Step two

Save the settings.

bummi
  • 162
  • 2
  • 2
  • 9