[HPADM] timezone - revisited

From: Harm Ensing (ensin001_at_hdxh0e.unix.telecom.ptt.nl)
Date: 04/08/05

  • Next message: Ruby Domalanta: "[HPADM] Creating 16G vs 4 x 4G swap space"
    To: hpux-admin@DutchWorks.nl
    Date: Fri, 8 Apr 2005 10:56:13 +0200 (METDST)
    
    

    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)
    

  • Next message: Ruby Domalanta: "[HPADM] Creating 16G vs 4 x 4G swap space"

    Relevant Pages

    • Re: ssh timezone in 5.0.7
      ... |> We seem to be having a problem with 5.0.7, SSH and the timezone. ... |> it's not a complete fix. ... |> Anyone have any ideas on how to correctly fix this? ...
      (comp.unix.sco.misc)
    • Re: timezone wont change from GMT
      ... >> I ran tz to correct the timezone ... > Are you logging in at the console, serial port, telnet or ssh? ... telnet comes in just fine. ... Now after a reboot things seem to be fine. ...
      (comp.unix.sco.misc)
    • Re: ssh timezone in 5.0.7
      ... > We seem to be having a problem with 5.0.7, SSH and the timezone. ... > If I manually set TZ=CST6CDT and export it, ... > Anyone have any ideas on how to correctly fix this? ...
      (comp.unix.sco.misc)
    • ssh timezone in 5.0.7
      ... We seem to be having a problem with 5.0.7, SSH and the timezone. ... type ENV, there is NO TZ variable at all. ... Anyone have any ideas on how to correctly fix this? ...
      (comp.unix.sco.misc)
    • Re: Rexx SSH and Cron
      ... Cron does not set an environment above the default. ... supposed to run the command. ... used when ssh is run in the background. ...
      (comp.lang.rexx)