Hi,
I have a Centos 5.5 server with no GUI installed. I have several times changed the timezone by copying the correct file to /etc/localtime, however something keeps changing it back. I'm not sure if this is a yum update or what. Without installing the graphical tools, how can I update the timezone in such a way that the /etc/localtime file won't keep getting clobbered.
Thank You, Nataraj
I used this fantastic guide last week: http://www.wikihow.com/Change-the-Timezone-in-Linux
Hope this helps.
Matt
On Thu, Jul 8, 2010 at 1:58 AM, Nataraj incoming-centos@rjl.com wrote:
Hi,
I have a Centos 5.5 server with no GUI installed. I have several times changed the timezone by copying the correct file to /etc/localtime, however something keeps changing it back. I'm not sure if this is a yum update or what. Without installing the graphical tools, how can I update the timezone in such a way that the /etc/localtime file won't keep getting clobbered.
Thank You, Nataraj
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I have a Centos 5.5 server with no GUI installed. I have several times changed the timezone by copying the correct file to /etc/localtime, however something keeps changing it back. I'm not sure if this is a yum update or what. Without installing the graphical tools, how can I update the timezone in such a way that the /etc/localtime file won't keep getting clobbered.
/usr/bin/system-config-time
(from the system-config-date RPM package)
It will work in text mode.
(Essentially /etc/sysconfig/clock is the config file that also needs updating)
Stephen Harris wrote:
I have a Centos 5.5 server with no GUI installed. I have several times changed the timezone by copying the correct file to /etc/localtime, however something keeps changing it back. I'm not sure if this is a yum update or what. Without installing the graphical tools, how can I update the timezone in such a way that the /etc/localtime file won't keep getting clobbered.
/usr/bin/system-config-time
(from the system-config-date RPM package)
It will work in text mode.
(Essentially /etc/sysconfig/clock is the config file that also needs updating)
Thank you. I'm hoping that the problem was caused by not updating /etc/sysconfig/clock which I have done now. I'm guessing that when the tzdata package gets updated it copies the latest timezone file to /etc/localtime, based on the timezone specified in /etc/sysconfig/clock.
I tried yum installing system-config-time, but it wanted to install two pages worth of additional dependancies. I'm trying to keep my server installations a little less bloated.
There where no symbolic links. All I had done was to copy the correct timezone file to the file /etc/localtime. Some have warned that symbolic links are a bad idea, because then if something tries to update the timezone it may clobber the data file in /usr/share/zoneinfo.
Nataraj
Natarj,
--- On Wed, 7/7/10, Nataraj incoming-centos@rjl.com wrote:
From: Nataraj incoming-centos@rjl.com Subject: [CentOS] how to properly change the timezone To: "CentOS mailing list" centos@centos.org Date: Wednesday, July 7, 2010, 5:58 PM Hi,
I have a Centos 5.5 server with no GUI installed. I have several times changed the timezone by copying the correct file to /etc/localtime, however something keeps changing it back. I'm not sure if this is a yum update or what. Without installing the graphical tools, how can I update the timezone in such a way that the /etc/localtime file won't keep getting clobbered.
At the time you did the copy, there likely was an existing symlink from /etc/localtime to another timezone. Then your copy was relegated back to the symlink on reboot? Something like that.
Before you do a copy like that, check for a symlink and delete it first.