How to set the time zone in Amazon EC2?

Gaurav Agarwal picture Gaurav Agarwal · Aug 13, 2012 · Viewed 80.4k times · Source

I want to change the time zone set in my Amazon EC2 instance running Ubuntu Linux to local time?

My Question

How to change the time zone in Amazon EC2?

Answer

Nishant picture Nishant · Aug 13, 2012

it should be no different than your desktop Ubuntu process. See here

  1. SSH to your EC2 server
  2. execute the following (to set timezone to Australia/Adelaide)

    $ echo "Australia/Adelaide" | sudo tee /etc/timezone
    Australia/Adelaide
    $ sudo dpkg-reconfigure --frontend noninteractive tzdata
    
    Current default time zone: 'Australia/Adelaide'
    Local time is now:      Sat May  8 21:19:24 CST 2010.
    Universal Time is now:  Sat May  8 11:49:24 UTC 2010.
    

Update

You can use tzselect utility to browse through. See here: http://manpages.ubuntu.com/manpages/precise/man1/tzselect.1.html

It's an interactive software. My Ubuntu (11.10) has it.

You could also refer this Wikipedia article

Brazil

Brazil/Acre
Brazil/DeNoronha
Brazil/East
Brazil/West