I use the following commands to set the timezone on our Amazon Linux (Centos) server:
ls -al /etc/localtime -rw-r--r-- 1 root root 118 25 dec 2012 /etc/localtime sudo mv /etc/localtime /etc/localtime.bak sudo ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
This backups the localtime file, so you can see if and when the time is set to the right timezone. Recently the time has been set back to the default. The bak file is still there, so I know I changed time in the past.
Is this because of a kernel update?
Why doesn't time stay the same and is there a way to make sure it does?
This is the time of the updated localtime file:
$ ls -al /etc/localtime -rw-r--r-- 1 root root 118 25 jun 19:05 /etc/localtime
Looking at /var/log/yum.log I see this:
Jun 25 19:05:27 Updated: glibc-common-2.17-55.143.amzn1.x86_64 Jun 25 19:05:30 Updated: glibc-2.17-55.143.amzn1.x86_64 Jun 25 19:05:31 Updated: libtiff-4.0.3-20.20.amzn1.x86_64 Jun 25 19:05:31 Updated: glibc-headers-2.17-55.143.amzn1.x86_64 Jun 25 19:05:31 Updated: subversion-libs-1.8.11-1.50.amzn1.x86_64 Jun 25 19:05:32 Updated: subversion-1.8.11-1.50.amzn1.x86_64 Jun 25 19:05:32 Updated: glibc-devel-2.17-55.143.amzn1.x86_64 Jun 25 19:05:32 Updated: libtiff-devel-4.0.3-20.20.amzn1.x86_64 Jun 25 19:05:32 Updated: python26-jmespath-0.7.1-1.9.amzn1.noarch Jun 25 19:05:32 Updated: python27-jmespath-0.7.1-1.9.amzn1.noarch Jun 25 19:05:33 Updated: glibc-2.17-55.143.amzn1.i686
So I suspect one of them to do this, one of the glibc updates I guess.