How to Change System Timezone on Linux Distros – Centos, Ubuntu, Redhat, Fedora

by Ashwin on February 7, 2011

Many a times after initial installation of Linux operating system we see the date not to be in our local timezone, instead its in default PST time zone, So here are the steps which will guide you to have your local time zone. So lets start the action

The system dates are displayed using a reference from a file in you /etc directory called localtime, if you change this your r almost done,….

ashwin-server:/opt/# ll -a /etc/localtime
-rw-r--r-- 1 root root 265 2011-02-07 14:47 /etc/localtime

But the real struggle is you wont be able to change the file or edit it because it is timezone data format, By default linux distribution has predefined almost all timezone data files prebuilt, so now its only matter of copy and paste. All the timezone data files are located in the “/usr/share/zoneinfo/” directory. Just Select the correct zone from the directory and your are almost done only 3 more steps remaining.

Check the current date we would be changing our timezone to Indian Standard Time Zone from Eastern Standard Time Zone

ashwin-server:/opt/# date
Mon Feb 7 04:14:10 EST 2011

First rename the Original file to different name

ashwin-server:/opt/# mv /etc/localtime /etc/localtime.old

Either copy your localzone data file or create a Symbolic link to the /etc directory

ashwin-server:/opt/# cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

OR

ashwin-server:/opt/# ln -a /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

And hurray Check your System time again

ashwin-server:/opt/# date
Mon Feb 7 14:47:26 IST 2011

Thanks.

      
Plugin by: PHP Freelancer

Related posts:

  1. Howto configure Network Time Protocol NTP Server on Linux Centos, Ubuntu, Fedora, RHEL This tutorial will guide you with step by step installation...
  2. Howto change MYSQL Root Password on linux CENTOS, REDHAT, FEDORA, UBUNTU, FREEBSD and other Unix – Linux based Operating system How to change MYSQL Root Password on Linux Distributions like...
  3. How to sent Message through Terminal to a Login users In Fedora, Centos, RedHat, Ubuntu. You can broadcast a message using WALL — How to...
  4. Packet Capturing and Analayzing packets Using TCPDUMP on Centos, Fedora, Ubuntu and other Linux Distros Many a times Linux System Admin2 face problem in network...
  5. How to broadcast a Message through Terminal to Login users In Fedora, Centos, RedHat, Ubuntu Do you want to sent message to all logged in...

Leave a Comment

Spam Protection by WP-SpamFree

Previous post:

Next post: