I have configured the timezone in my servers for a custom timezone (America/Mexico_city) by creating a dynamic link in /etc/localtime.
Nevertheless, every now and then and with no apparent reason, my timezone goes back to default (PST) and my services start failing.
I'm using HP Cloud services.
Has anybody else experienced this?
Setting the timzezone via /etc/localtime symlinks should be avoided. CentOS 6 gets timezone settings from /etc/sysconfig/clock
/etc/localtime will get updated if one of the time config scripts is run.
Timezones can also be overridden in scripts by setting/exporting a TIMEZONE variable. You can always set an explicit TIMEZONE in the start-up script of a service that is sensitive to TZ changes.
It's a known bug, resolved after Centos/RedHat 6.8 https://bugzilla.redhat.com/show_bug.cgi?id=1200555
Anyway, do not symlink
/etc/localtime
, use the recommended procedure: