Time on AWS Linux AMI

This post was published 8 years, 4 months ago. Due to the rapidly evolving world of technology, some concepts may no longer be applicable.

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:


3 thoughts on “Time on AWS Linux AMI

    • /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/)

  1. Pingback: Set the time zone on Amazon Machine Image (AMI) | NathanFriend.co.uk

Leave a Reply to cyberx86 Cancel reply

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