Posts Tagged ‘ alestic

Change timezone from UTC to GMT using an automatic script

Hi,

If you are using alestic Ubuntu AMIs for AWS/EC2 the timezone is UTC by default, I had to change that to GMT for a customer here is a way to do it automatically in your build script or without human intervention:

echo “Etc/GMT” | tee /etc/timezone
dpkg-reconfigure –frontend noninteractive tzdata

Note: The –frontend option has two – in front

You can check more timezones at the directory /usr/share/zoneinfo/

Hope it helps you!

Cheers!