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?
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?
UPDATED ANSWER FOR UBUNTU 16.04:
Do:
to update your timezone.
To list down all the available timezones you can do:
Another way of changing the time (This was done on an Amazon EC2 Linux instance)
Remove your localtime file
Change Directory to ZoneInfo
This folder contains all of the timezone information. You then just need to softlink to the appropriate zone.
Create a softlink to /etc/localtime
That will change your server timezone to GB
None of the above steps worked for me, so thought of writing this new answer here
NOTE: This refers to a linux box (debian in my instance) should be used under your AWS launch configurations "User Data".
If you're planning to set the TIMEZONE on instance boot use below (works like a charm) use you're own Country/City instead of "Australia/Sydney".
Well described in below link
https://askubuntu.com/questions/3375/how-to-change-time-zone-settings-from-the-command-line/594186#594186?s=8f7d09598b2246629a70bb1928501f52
e:g- sudo timedatectl set-timezone Asia/Kolkata
Locate your timezone in the directory
/usr/share/zoneinfo/
.E.g. To change timezone for Toronto
/usr/share/zoneinfo/America/Toronto
Symlink your timezone to
/etc/localtime
e.g. for Toronto:Reboot to finish