Timezone Change/Updated for Linux/Unix Debian/Fedora/Ubuntu/Centos Change Update Time zone -

Timezone Change/Updated for Linux/Unix Debian/Fedora/Ubuntu/Centos Change Update Time zone

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.

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..

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).

Anyway that is the information for your timezone.

Note that all timezone information is stored in the following directory:

ls /usr/share/zoneinfo/

Africa      Atlantic   Chile    Eire     Factory  GMT-0      Iceland      Jamaica    Mexico   NZ        posix       ROC        Universal  zone.tab
America     Australia  CST6CDT  EST      GB       GMT+0      Indian       Japan      Mideast  NZ-CHAT   posixrules  ROK        US         Zulu
Antarctica  Brazil     Cuba     EST5EDT  GB-Eire  Greenwich  Iran         Kwajalein  MST      Pacific   PRC         Singapore  UTC
Arctic      Canada     EET      Etc      GMT      Hongkong   iso3166.tab  Libya      MST7MDT  Poland    PST8PDT     Turkey     WET
Asia        CET        Egypt    Europe   GMT0     HST        Israel       MET        Navajo   Portugal  right       UCT        W-SU

Inside one of those subdirectdories will be the file with your zone information.

For example the Pacific Standard time I use is located in: /usr/share/zoneinfo/Canada/Pacific

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.

Best Way To Update Timezone

I think to keep the existing format (no symlink and a physical file), this is the best way:

cat /usr/share/zoneinfo/Canada/Pacific > /etc/localtime

This just overwrites/updates your /etc/localtime file.  For more advanced users you could just delete /etc/localtime and instead symlink to that file (same results but different method):

rm /etc/localtime

ln -s /usr/share/zoneinfo/Canada/Pacific /etc/localtime

Now just type date and you'll see your timezone has been updated.


  • How to disable Google Fonts in Wordpress
  • Unable to load dynamic library /usr/lib64/php/modules/php_openssl
  • mysqld in Linux hacked
  • W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
  • cannot mount kvm ntfs image
  • h264 DVR security camera footage cannot be played
  • dhcpd.conf how to secure so only known and allowed clients will be given dhcpd IP address leases
  • Thunderbird E-mail List Blank White but e-mails still clickable and viewable
  • css responsive images
  • responsive table without changing much code solution
  • yum how to install old obsolete packages
  • PHP Howto Store Value of Included File Output Into Variable
  • PHP Migration from 5.3 to 5.4+ and dealing with deprecated functions
  • ffmpeg vidstab to stabilize video
  • userdel user userdel: cannot lock /etc/passwd; try again later.
  • mdadm how to mount inactive array
  • How to find and mount mdadm arrays automatically
  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua
  • [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Err
  • linux how to answer yes to copy