[HPADM] timezone - revisited

From: Harm Ensing (ensin001@hdxh0e.unix.telecom.ptt.nl)
Date: Fri Apr 08 2005 - 04:56:13 EDT


Hello,

This is a follow-up of my post yesterday about the timezone kernel-variable, TZ and
remote execution through ssh, remsh and cron. Latter is not remote-executed, but has
a similar environment-setup.

Several readers of this list replied with useful remarks.
>From this I compiled the following conclusion:

Conclusion 1:
When executing a command through ssh, remsh or cron always import /etc/profile so
That all necessary environment settings are set. So:
# ssh system ". /etc/profile; command"

Conclusion 2:
When executing a script or program through ssh, remsh or cron the environment is undefined.
This also goes for the TZ variable which governs representation of timezone and DST.

When variable TZ is undefined a default is taken from kernel-variable 'timezone'.
Use of this kernel-setting varies over different versions of HP-UX.
According to specifications the situation in HP-UX 11.11 should be as follows:

Maximum value: 720
Minimum value: -720
Default value: 420
In run-time the values represent:
420 : U.S. Mountain Time, +7 hours from UTC (GMT)
  0 : UTC (GMT)
-60 : Middle European Time (MET), -1 hour from UTC (GMT)

But .... Maybe I'm seeing it wrong, but when I run the following commands it seems
that the relation between timezone and (default) TZ is not as I stated above.
Since the result is not as expected our customer still urges me to come up with
an explanation and solution. (Well, the solution is stated above)

Consider te output of these commands:

# ssh nlxpms04 "uname -a;echo \"TZ=$TZ\";/usr/sbin/kmtune|grep timezone;date"
HP-UX nlxpms04 B.11.11 U 9000/800 3845606780 unlimited-user license
TZ=
timezone -60 - (-60)
Fri Apr 8 04:08:03 EDT 2005

# ssh nlxpms06 "uname -a;echo \"TZ=$TZ\";/usr/sbin/kmtune|grep timezone;date"
HP-UX nlxpms06 B.11.11 U 9000/800 3845606780 unlimited-user license
TZ=
timezone 420 - 420
Fri Apr 8 10:07:59 METDST 2005

Findings:
A timezone-value of -60 seems to correspond with EDT.
A timezone-value of 420 seems to correspond with METDST.

My questions:
1. Is my interpretation of timezone-values and the relation with TZ wrong?
2. Is it absolutely necessary to set timezone to the correct value?
3. Which value should that be for MET?
4. Where does the DST in METDST (in result of second command) come in?
5. How does the system come up with the notion that we are now in 'DST'?

Any help/comment is very much appreciated.

Have a nice day,
-Harm Ensing-

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:46 EDT