Showing results for 
Search instead for 
Did you mean: 

Time Zone

Occasional Visitor

Time Zone

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
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.

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