Recently I had installed a new Ubuntu 14.10 LTS system to use as development server. During installation it provides to select preferred timezone but unfortunately I had selected wrong timezone that time. So I had corrected it with following way. This method will work most of Linux operating systems like CentOS, Red Hat, Fedora, LinuxMint, Ubuntu and Debian.
Check Current Timezone of System
Linux uses /etc/localtime file as current systems timezone. We can simply use “
[email protected]:~$ date Wed Nov 4 08:16:51
As per above output systems current timezone is set to EST.
Change Timezone of System
CentOS and Red Hat systems keep all timezone setting files inside /usr/share/zoneinfo/ directory. First rename or unlink old file.
$ sudo mv /etc/localtime /etc/localtime.old
Now create a symbolic link of /etc/localtime with new timezone settings file. For below example, I am using America/New_York (EST/PST) timezone for my server. To find out more timezone list visit here.
$ sudo ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
Your timezone has been changed successfully. Lets check timezone again.
[email protected]:~$ date Wed Nov 4 03:17:54