Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.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.2k 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.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories

...