0 votes
1 view
in AWS by (8.9k points)

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?

1 Answer

0 votes
by (18.5k points)

Try the following steps:

Step 1: SSH into your EC2 instance

Step 2: Run the following block of commands to  change the timezone

Note: This particular block of commands sets the timezone to Australia/Adelaide. You can choose your own timezone and replace it with Australia/Adelaide in the following block of commands.

$ 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:      Thu July  8 21:19:24 CST 2019.

Universal Time is now:  Thu July 8 11:49:24 UTC 2019.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...