1847170 Members
5649 Online
110263 Solutions
New Discussion

Re: time zone

 
Hector Vargas
Frequent Advisor

time zone

Hi forum,


I have two servers rp3440 running nptd daemon, very recently I change the time zone from UTC to PST.

basically I update file
/etc/TIMEZONE
TZ=PST8PDT
#TZ=UTC
export TZ

and file:
/etc/default/tz
PST8PDT

command date on server1
#date
Thu Nov 16 11:14:06 PST 2006

command date on server2
#date
Thu Nov 16 11:14:06 PST 2006

but if I issue from server1
# ssh date

Thu Nov 16 19:15:37 UTC 2006


I did not reboot my servers after the timezone change.
4 REPLIES 4
Victor Fridyev
Honored Contributor

Re: time zone

Hi,

You already answered your question. In order to see the change, the computer must be rebooted.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Patrick Wallek
Honored Contributor

Re: time zone

An SSH command like you used will not necessarily source /etc/profile ~/.profile or anything else, so no environment variables will be set.

Since the process was started with TZ=UTC, it will remain that way until you either stop/start SSH or reboot the server.

If you want to do a test do this on both servers:

# /sbin/init.d/secsh stop
# /sbin/init.d/secsh start

Now the process should be started with TZ=PST8PDT and you should see a different time when you do an 'ssh date'.
Calandrello
Trusted Contributor

Re: time zone


friend
interesting e to effect boot to validate the alteration of the hour
Hector Vargas
Frequent Advisor

Re: time zone

Thanks Victor,

you are right, either I need to restart ssh deamon and probably any other deamon that might be using tz variable or reboot the servers.