Operating System - Linux
1748140 Members
3496 Online
108758 Solutions
New Discussion юеВ

Re: time zone will not change

 
Matt Shaffer_1
Regular Advisor

time zone will not change

If I run date command from command line,time zone is wrong. If I login via VNC or to the console, the time zone is right. I've linked the /usr/share/zoneinfo/$TZ to /etc/localtime and also tried copying it. I am on east coast and date shows MDT. What is going on?

thanks.
8 REPLIES 8
Matt Shaffer_1
Regular Advisor

Re: time zone will not change

I forgot to mention, server is rhel 4.3 and tz version is tzdata-2006a-1.EL4.
Matti_Kurkela
Honored Contributor

Re: time zone will not change

Please run "echo $TZ" in both situations. If the result is different, find out what is setting the TZ variable and make sure it is set/unset as appropriate in all situations.

Is /etc/localtime readable to all users? It should be.

MK
MK
Matt Shaffer_1
Regular Advisor

Re: time zone will not change

$TZ was just an example. See below for setup. Should be working.

new_edi:/root>ls -la /etc/localtime
lrwxrwxrwx 1 root root 27 Sep 17 07:56 /etc/localtime -> /usr/share/zoneinfo/EST5EDT

new_edi:/root>ls -la /usr/share/zoneinfo/ES*
-rw-r--r-- 1 root root 1267 Sep 17 08:22 /usr/share/zoneinfo/EST5EDT
Ivan Ferreira
Honored Contributor

Re: time zone will not change

Ensure to update also /etc/sysconfig/clock.

Ensure to logout and login again. Be careful because changin the time zone may affect the system time and your applications.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Matt Shaffer_1
Regular Advisor

Re: time zone will not change

ZONE="America/New_York"
UTC=false
ARC=false


output of date command still says MDT
Sandeep_Chaudhary
Trusted Contributor

Re: time zone will not change

u can use

redhat-config-date

OR "timeconfig" command
Sandeep_Chaudhary
Trusted Contributor

Re: time zone will not change

u can also try system-config-date
Matt Shaffer_1
Regular Advisor

Re: time zone will not change

.