fir3net
PPS-Firenetbanner-780.5x190-30-03-17

CentOS timezone not updating

ISSUE

When configuring the timezone within Centos the correct timezone is not propagated and the output of the command date does not represent the timezone previously configured.

SOLUTION

This can be caused by corrupted timezone files. To resolve the issue remove the soft-link, reinstall tzdata and then recreate the soft-link to the necessary timezone.

[root@server ~]# rm /etc/localtime
rm: remove regular file '/etc/localtime'? y

 

[root@server ~]# yum reinstall tzdata -y
[root@server ~]# ln -s /usr/share/zoneinfo/GB /etc/localtime
[root@server ~]# date
Fri May 22 12:05:06 BST 2011

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001