Prevent Amazon EC2 Time zone from reverting back on yum update

Posted by D.Tate on Server Fault See other posts from Server Fault or by D.Tate
Published on 2012-11-06T15:45:35Z Indexed on 2012/11/06 17:05 UTC
Read the original article Hit count: 244

Filed under:
|
|
|
|

I use an Amazon EC2 server instance that runs a distro called Amazon Linux AMI. (I've read that it is based on CentOS/Red Hat). My specific version is the 2012.09 release.

Anyway, I was able to change the time zone about a week ago from the default UTC to America/New_York (which is EST/EDT). The command I used to change it was:

    ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

...thanks to this other Server Fault question. At that point, I was able to run date from the the command line, and it correctly displayed the EDT time. And even after EDT "fell back" to EST this past Sunday, I was pleased to find that running date still produced the correct local time. So that was great.

However, after running a yum update yesterday, it seems that my time zone got reverted back to plain 'ol UTC. I even checked the last modified time of /etc/localtime file, and indeed it confirmed that it had been modified around the same time I had updated.

Is there any way to prevent this from happening again, or will I be stuck resetting the time zone every time I do a yum update?

© Server Fault or respective owner

Related posts about linux

Related posts about centos