CentOS keeps losing its localtime setting? [duplicate]

I'm running an extremely typical CentOS 6.5 server at DigitalOcean. As part of the site setup, I've changed /etc/localtime to something appropriate for me:

rm /etc/localtime
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

This works fine, except somebody/something is resetting it: I'll check back in with the server at some random (I think) point, and find that my link has been replaced with the original localtime file, putting the server back in UTC. I've looked in /etc/cron* on the chance that there's a script in there doing it, but I can't find anything. Has anyone else run into this before? Thanks!


Solution 1:

In order to (correctly) change the timezone of your system you will need to access the file /etc/sysconfig/clock and edit ZONE=<filename> value, for example

ZONE="Europe/Belgrade"

Then proceed with linking the zoneinfo file to /etc/localtime

ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime

(if the question is what is resetting timezone info, it might be yum update)