How do I change the timezone of my Linode?
The timestamp from my Linode does not match the local time. How can I check which timezone is being used and update that?
1 Reply
There are several methods to check and update the timezone on your Linode. Just for clarity, I'll be using America/New_York as my example timezone. If you aren't sure of the naming for your timezone, you can find a list with the following command, or on the following URL:
ls /usr/share/zoneinfo/
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
In order to check the current timezone your Linode is using, depending on your operating system, and which method of setting the timezone was used, you can use the following commands:
cat /etc/timezone
ls -l /etc/localtime
printenv | grep TZ
=========================
There are also a few methods for setting the timezone, also depending on your operating system and preference:
sudo dpkg-reconfigure tzdata
echo America/New_York > /etc/timezone
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
export TZ=America/New_York