1753349 Members
5103 Online
108792 Solutions
New Discussion юеВ

Re: Time Zone

 
AbhiChauhan
New Member

Time Zone

Hi,
When I fire the 'date' command on the HP-UX system, I get the correct date and time. But when I fire the date command on the same machine, through remsh, I get the wrong date.
Currently, the TZ is IST. When I fire the date command, using remsh, I get IST-5:30. Is there any other setting of Time Zone for remsh? If yes, then what is the procedure to change it
3 REPLIES 3
Johnny Damtoft
Regular Advisor

Re: Time Zone

Try executing your /etc/profile when you jump info remsh.

I have a few links in my bookmarks, about this topic.
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2005-04/0021.html
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=534403


--Johnny
Dennis Handly
Acclaimed Contributor

Re: Time Zone

IST-5:30 is the correct TZ setting for India.

It appears that TZ is one of the few variables that remsh sets, probably from /etc/TIMEZONE.

As Johnny says, if you want your variables set, you should source your .profile.
Bill Hassell
Honored Contributor

Re: Time Zone

The TZ value very much depends on the environment supplied to the program. A telnet connection will go through 'normal' profiles but remsh does not perform a normal login. You can verify this like this:

remsh remotebox set

The TZ value for a simple remsh was defined by inetd which is the parent for remshd. inetd gets the TZ value from /etc/TIMEZONE when the system boots up but any changes to that file will not be seen by inetd. You must restart inetd with the desired TZ value.


Bill Hassell, sysadmin