

I think to keep the existing format (no symlink and a physical file), this is the best way:Ĭat /usr/share/zoneinfo/Canada/Pacific > /etc/localtime #If you are missing /usr/share/zoneinfo then install the "tzdata" package. There are two ways to change your timezone, you can copy the contents of your timezone file into /etc/localtime or remove your localtime file and symlink to the new timezone. Inside one of those subdirectdories will be the file with your zone information.įor example the Pacific Standard time I use is located in: /usr/share/zoneinfo/Canada/Pacific

Note that all timezone information is stored in the following directory:Īfrica Atlantic Chile Eire Factory GMT-0 Iceland Jamaica Mexico NZ posix ROC Universal zone.tabĪmerica Australia CST6CDT EST GB GMT+0 Indian Japan Mideast NZ-CHAT posixrules ROK US ZuluĪntarctica Brazil Cuba EST5EDT GB-Eire Greenwich Iran Kwajalein MST Pacific PRC Singapore UTCĪrctic Canada EET Etc GMT Hongkong iso3166.tab Libya MST7MDT Poland PST8PDT Turkey WETĪsia CET Egypt Europe GMT0 HST Israel MET Navajo Portugal right UCT W-SU Your time zone info file is actually in /etc/localtime if you open this file in vi/vim/pico you'll see it's gibberish (binary code or another encoding).Īnyway that is the information for your timezone.

Many OS's have tools to update the timezone, but most of them (even if command line) require several bloated packages and even Xorg/KDE based packages etc. This way should work on all Linux machines, at least RHEL/Debian (Ubuntu) based distros but most likely all and also should work on many Unix style machines I believe.

To see the list you can just type " timedatectl set-timezone " and hit tab twice. Replace the America/Vancouver with the correct timezone. Timedatectl set-timezone America/Vancouver #if you are missing timedatectl this in newer distros like Ubuntu/Mint/Debian and are using a container like Docker then do "apt install systemd" In Newer Linux Distros This Way Is Easiest and works on newer versions like Ubuntu, Mint, Fedora, Centos, Debian etc.
