How to Change Time Zone on CentOS 6?

by | 3 Nov 2015 | CentOS, Linux, OS, Technology | 2 comments

Always having difficulty on how to change time zone on CentOS 6? Just bookmark this page and everything will be solved.

Identify your current time zone

There are two ways to identify your current time zone.

date

or

ls -l /etc/localtime

Change time zone

Change “Amercia/Chicago” to the respective time zone that you want.

cp /etc/localtime /root/old.timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime

 

[Additional] Change PHP time zone

nano /etc/php.ini

Search for this line

;date.timezone =

Change it to

date.timezone = Asia/Singapore

Of course change it the time zone you want it to be

 

After running the commands above, remember to run the first step again to check that your time zone has been updated successfully.

That’s it. Changing CentOS 6 time zone is as simple as this.

2 Comments

  1. Hosting

    This made it a lot easier, thanks. I m hoping this change in server time will reflect on Awstats so the reports are in sync with my local time.

    Reply
  2. Hebergeur

    Be sure to reboot your SQL server. Otherwise it will continue to operate in the old time zone. This can cause problems that are hard to debug.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Related Posts

Amazon Web Services (AWS)ApacheCentOSDatabaseLinuxMySQLOSProgrammingServerTechnology
8 Simple Steps to Setup a Web Server with Apache Virtual Hosts & MySQL in Centos

8 Simple Steps to Setup a Web Server with Apache Virtual Hosts & MySQL in Centos

This tutorial will be guiding you in setting up a web server with pre-installed Centos. In summary, you will be installing Apache and MySQL, and learning how to configure virtual hosts in Apache. Note: before proceeding with this tutorial. Make sure you figure out...

AppleiOSMobile PhonesObjective-CProgrammingSwiftTechnology
How to install Cocoapods for Objective-C/Swift development on Mac OS?

How to install Cocoapods for Objective-C/Swift development on Mac OS?

Steps to install Cocoapods Cocoapods is used in Xcode IDE for development from iOS apps using Objective-C/Swift. Cocoapods helps developers add external libraries to their iOS project easily. The following tutorial guides you on the steps to install Cocoapods on...

AndroidAndroidAppleiOSJavaMobile PhonesObjective-CProgramming
iPhone Camera
Complete overview of the mobile app development process (Infographic)

Complete overview of the mobile app development process (Infographic)

Clients always have the misperception that developing a mobile app is as easy as developing a mobile application would be a walk in a park without much effort involved. The following infographic pretty much sums up the total cost and effort for mobile app...