How can i change the timezone on a 4.3 box? This used to be available using the 'setup' utility but seems not anymore.
thanks
Tom Brown wrote:
How can i change the timezone on a 4.3 box? This used to be available using the 'setup' utility but seems not anymore.
From the command line use the "date" utility.
%z RFC-2822 style numeric timezone (-0500) (a nonstandard extension) %Z time zone (e.g., EDT), or nothing if no time zone is determinable
Or "system-config-date" will bring up the little GUI configurator.
Max
Jason Bradley Nance wrote:
'date' doesn't change /etc/localtime does it?
man date
ENVIRONMENT TZ Specifies the timezone, unless overridden by command line parameters. If neither is specified, the setting from /etc/localtime is used.
Here's some help with various options.
http://www.hypexr.org/linux_date_time_help.php
Max
'date' doesn't change /etc/localtime does it?
man date
ENVIRONMENT TZ Specifies the timezone, unless overridden by command line parameters. If neither is specified, the setting from /etc/localtime is used.
Thanks, but that isn't what I asked, nor does it address the original question by the poster. The original question was how to change the system timezone (which is what `system-config-date` does), not just alter the system time (which is what `date` does). I was trying to point out that your solution wasn't for his question in a polite manner.
j
Jason Bradley Nance wrote:
Thanks, but that isn't what I asked, nor does it address the original question by the poster. The original question was how to change the system timezone (which is what `system-config-date` does), not just alter the system time (which is what `date` does). I was trying to point out that your solution wasn't for his question in a polite manner.
His initial question was "How can i change the timezone on a 4.3 box?"
I pointed references to using date, and to using "system-config-date" which answered his initial question (as I say this politely back :))
Max
His initial question was "How can i change the timezone on a 4.3 box?"
I pointed references to using date, and to using "system-config-date" which answered his initial question (as I say this politely back :))
Right. `date` doesn't change the system timezone, it changes the system time.
Jason Bradley Nance wrote:
Right. `date` doesn't change the system timezone, it changes the system time.
I went back and read what I wrote...I was wondering why you mentioned this. What I typed was read differently than what I was thinking (if that makes sense). :)
It's been a long day. You are absolutely correct about date, I was meaning to point him towards time references. Poor wording on my part.
Max
Tom Brown wrote:
How can i change the timezone on a 4.3 box? This used to be available using the 'setup' utility but seems not anymore.
thanks
I've always removed /etc/localtime and created a symbolic link to the timezone file of choice.
ln -s /usr/share/zoneinfo/GMT /etc/localtime
Mike wrote:
Tom Brown wrote:
How can i change the timezone on a 4.3 box? This used to be available using the 'setup' utility but seems not anymore.
thanks
I've always removed /etc/localtime and created a symbolic link to the timezone file of choice.
ln -s /usr/share/zoneinfo/GMT /etc/localtime
Older versions of RedHat (6.x maybe) used to place a link instead of a copy of the zoneinfo file when configuring the timezone by default. I wonder why they changed it to a copy. Only thing I can think of is that if the timezone directory structure changes during an RPM update your localtime link will stop working. The disadvantage of the current copy behavior is that when the zoneinfo gets updated(like the new US Daylight changes next year) you have to manually go to all the servers and set the timezone again(manually or through the utility that comes with the RedHat/CentOS version you are using).
On Fri, 2006-06-16 at 10:59 -0400, Adam Gibson wrote:
Mike wrote:
Tom Brown wrote:
How can i change the timezone on a 4.3 box? This used to be available using the 'setup' utility but seems not anymore.
thanks
I've always removed /etc/localtime and created a symbolic link to the timezone file of choice.
ln -s /usr/share/zoneinfo/GMT /etc/localtime
Older versions of RedHat (6.x maybe) used to place a link instead of a copy of the zoneinfo file when configuring the timezone by default. I wonder why they changed it to a copy. Only thing I can think of is that if the timezone directory structure changes during an RPM update your localtime link will stop working. The disadvantage of the current copy behavior is that when the zoneinfo gets updated(like the new US Daylight changes next year) you have to manually go to all the servers and set the timezone again(manually or through the utility that comes with the RedHat/CentOS version you are using).
The reason they changed is that /usr is not ALWAYS available for linking on all systems. By design, /usr is not available in single user mode ... also maybe not available in some custom runlevel 2 setups by clients.
/etc is always there ... even in single use mode.
This doesn't effect 99% of people ... as /usr is always available in my boot ups, and if I need to change the timezone, I do create links ... but it is probably more technically correct to copy the file instead to /etc.