Time on AWS Linux AMI

The time on the Amazon Linux AMI is set, by default to UTC. To change this, symlink one of the timezone files from /usr/share/zoneinfo/ to /etc/localtime. The change takes effect immediately (and will also affect most logs, etc). For example:

ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime

To make the change persist through updates, it is necessary to set the ZONE parameter in /etc/sysconfig/clock as well. This parameter specifies the file under /usr/share/zoneinfo that is to be used. For instance:


By cyberx86

Just a random guy who dabbles with assorted technologies yet works in a completely unrelated field.


    1. /etc/localtime is owned by root – you must, therefore, perform the operation as the superuser. Prefix the command with sudo and it should work fine. i.e.:

      sudo ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime

      (Of course, if you aren’t in the EST5EDT timezone, change it to an appropriate entry from /usr/share/zoneinfo/)

Leave a comment

Your email address will not be published. Required fields are marked *