CentOS 5.5 Tutorials CentOS 5.6 Tutorials CentOS 5.7 Tutorials

CentOS Change Timezone

After installing CentOS we sometimes see that the date is not in our desired timezone, instead it defaulted to the PST timezone.

Correcting your timezone is an easy operation, so here is a quick guide to change your CentOS timezone configuration file.

Firstly you’ll need to know your timezone and/or country, a list can be found in /usr/share/zoneinfo/

The more generic procedure to change the timezone is to create a symlink to file /etc/localtime

# ln -sf /usr/share/zoneinfo/Africa/Johannesburg /etc/localtime

OR you can copy and replace the current localtime setting

# cp /usr/share/zoneinfo/Africa/Johannesburg /etc/localtime

To verify that your timezone is changed use the date command:

# date

By George

Technical Samurai specializing in open source IT Automation and Cloud Infrastructure.