Monday, April 29, 2013

Change Timezone of Amazon EC2 Instance (Linux)



1.logging to EC2 instance remotely

2. Check the time of the ec2 instance date by > date

3. Time zone can be check as 
>cat /etc/sysconfig/clock
ZONE="UTC"
UTC=true

4.Change the time
cp /etc/localtime /etc/localtime.backup
ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime

5.Make the change permanent by adding the following line to the "/etc/sysconfig/clock" file: ZONE="Australia/Sydney"

After this this will show the correct Sydney time.
If you do not do item 5, the system time will reverting back when the EC2 instance restarted

No comments:

Post a Comment