<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Timezone discrepancies in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866084#M277541</link>
    <description>I would simplify your rsh query. As mentioned, your local shell will expand variables like $TZ before sending the result to your remote systems. To avoid this, start with a simple query:&lt;BR /&gt; &lt;BR /&gt;rsh pumbaa 'echo $TZ;date'&lt;BR /&gt;rsh bamse 'echo $TZ;date'&lt;BR /&gt; &lt;BR /&gt;In this case, you are not sending TZ (as defined in your local computer) but are asking what the current environment has. If you do this:&lt;BR /&gt; &lt;BR /&gt;rsh pumbaa "TZ=$TZ date"&lt;BR /&gt;rsh bmase "TZ=$TZ date"&lt;BR /&gt; &lt;BR /&gt;You are taking $TZ from serverX and sending it over to the remote systems. To see what thye shell does to your command line, do this:&lt;BR /&gt; &lt;BR /&gt;echo rsh pumbaa "TZ=$TZ date"&lt;BR /&gt;echo rsh bmase "TZ=$TZ date"&lt;BR /&gt;echo rsh pumbaa 'TZ=$TZ date'&lt;BR /&gt;echo rsh bmase 'TZ=$TZ date'&lt;BR /&gt; &lt;BR /&gt;NOTE: rsh (remsh inside HP-UX) has a limited environment just like cron or at. Try this to see the environments:&lt;BR /&gt; &lt;BR /&gt;rsh pumbaa env&lt;BR /&gt;rsh bamse  env</description>
    <pubDate>Thu, 21 Sep 2006 08:43:20 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2006-09-21T08:43:20Z</dc:date>
    <item>
      <title>Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866077#M277534</link>
      <description>We have two HP servers, which we run tabs on via scripts run from a third remote machine, but I have recently discovered a very strange behaviour: &lt;BR /&gt;&lt;BR /&gt;serverX@root#: rsh pumbaa "uname -a;echo \"TZ=$TZ\";/usr/sbin/kmtune | grep timezone; /usr/sbin/kmtune | grep \"dst \";date"&lt;BR /&gt;HP-UX pumbaa B.11.11 U 9000/800 620309382 unlimited-user license&lt;BR /&gt;TZ=MET-1METDST,M3.5.0/02:00:00,M10.5.0/03:00:00&lt;BR /&gt;timezone                  420  -  420&lt;BR /&gt;dst                         1  -  1&lt;BR /&gt;Wed Sep 20 08:00:47 METDST 2006&lt;BR /&gt;&lt;BR /&gt;So far all well. But on the other server:&lt;BR /&gt;&lt;BR /&gt;serverX@root#: rsh bamse "uname -a;echo \"TZ=$TZ\";/usr/sbin/kmtune | grep timezone; /usr/sbin/kmtune | grep \"dst \";date"&lt;BR /&gt;HP-UX bamse B.11.11 U 9000/800 629309372 unlimited-user license&lt;BR /&gt;TZ=MET-1METDST,M3.5.0/02:00:00,M10.5.0/03:00:00&lt;BR /&gt;timezone                  420  -  420&lt;BR /&gt;dst                         1  -  1&lt;BR /&gt;Wed Sep 20 02:01:17 EDT 2006&lt;BR /&gt;&lt;BR /&gt;I've checked /etc/default/tz and /etc/TIMEZONE on both servers, and they are identical. I've even checked the "locale" and they are identical. &lt;BR /&gt;&lt;BR /&gt;I can't see why the second server Bamse is reporting the date in EDT and only when queried remotely.</description>
      <pubDate>Wed, 20 Sep 2006 01:38:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866077#M277534</guid>
      <dc:creator>Jonathan McKee</dc:creator>
      <dc:date>2006-09-20T01:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866078#M277535</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;have you compared&lt;BR /&gt;remsh pumbaa env&lt;BR /&gt;whith&lt;BR /&gt;remsh bamse env&lt;BR /&gt;?&lt;BR /&gt;&lt;BR /&gt;Jean-Yves</description>
      <pubDate>Wed, 20 Sep 2006 04:30:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866078#M277535</guid>
      <dc:creator>Jean-Yves Picard</dc:creator>
      <dc:date>2006-09-20T04:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866079#M277536</link>
      <description>Yes, I compared the two "env":&lt;BR /&gt;&lt;BR /&gt;serverX@root#bin: remsh pumbaa "env"&lt;BR /&gt;_=/usr/bin/env&lt;BR /&gt;PATH=/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/contrib/bin:/usr/local/bin:&lt;BR /&gt;LOGNAME=root&lt;BR /&gt;SHELL=/sbin/sh&lt;BR /&gt;HOME=/&lt;BR /&gt;PWD=/&lt;BR /&gt;TZ=MET-1METDST&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;serverX@root#bin: remsh bamse "env"&lt;BR /&gt;_=/usr/bin/env&lt;BR /&gt;PATH=/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/contrib/bin:/usr/local/bin:&lt;BR /&gt;LOGNAME=root&lt;BR /&gt;SHELL=/sbin/sh&lt;BR /&gt;HOME=/&lt;BR /&gt;PWD=/&lt;BR /&gt;TZ=EST5EDT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Although the HP servers are identical in root's .profile, /etc/profile, and csh.login, as well as /etc/TIMEZONE, /etc/default/tz, and the kernel parameters "dst" and "timezone".</description>
      <pubDate>Wed, 20 Sep 2006 08:55:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866079#M277536</guid>
      <dc:creator>Andres Viir</dc:creator>
      <dc:date>2006-09-20T08:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866080#M277537</link>
      <description>A couple of things:&lt;BR /&gt; &lt;BR /&gt;- Change your query for timezone and dst to a single grep: &lt;BR /&gt; &lt;BR /&gt;/usr/sbin/kmtune | grep -e timezone -e \"dst \"&lt;BR /&gt; &lt;BR /&gt;for efficiency. Note that the kernel parameters timezone and dst are virtually meaningless today. A long time ago, some programs would not use the standard Unix library calls for ctime (and friends) and would have to make a crude approximation of the time from the timezone value and the dst setting. The dst value is particularly crude and will produce wrong offsets for many different timezones.&lt;BR /&gt; &lt;BR /&gt;- Your TZ value is carrying a rule from your info-gathering machine which may not apply the same way on your HP-UX boxes. The long form:&lt;BR /&gt; &lt;BR /&gt;TZ=MET-1METDST,M3.5.0/02:00:00,M10.5.0/03:00:00&lt;BR /&gt; &lt;BR /&gt;It should work but I would first try this command directly on each HP-UX box:&lt;BR /&gt; &lt;BR /&gt;TZ=MET-1METDST,M3.5.0/02:00:00,M10.5.0/03:00:00 date&lt;BR /&gt; &lt;BR /&gt;Also check the contents of:&lt;BR /&gt; &lt;BR /&gt;cat /etec/TIMEZONE&lt;BR /&gt;cat /etc/default/tz&lt;BR /&gt; &lt;BR /&gt;From the man page for timezone:&lt;BR /&gt; &lt;BR /&gt;"if TZ is not present, then the value contained in /etc/default/tz is used for the default...if /etc/default/tz is not set then the default value is equivalent to EST5EDT (Eastern Standard Time) of the USA."&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Sep 2006 09:07:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866080#M277537</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-20T09:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866081#M277538</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the problem is your remsh/rsh call:&lt;BR /&gt;&lt;BR /&gt;serverX@root#: rsh bamse "uname -a;echo \"TZ=$TZ\""&lt;BR /&gt;&lt;BR /&gt;The value of $TZ is expanded by the local shell of 'serverX' and not at the remote host 'bamse'.&lt;BR /&gt;You'll have to use something like this:&lt;BR /&gt;rsh bamse 'uname -a;echo TZ=$TZ'&lt;BR /&gt;&lt;BR /&gt;Call 'set -x' in your shell before the 'rsh' call or use&lt;BR /&gt;TZ=UUU-9VVV rsh bamse "uname -a;echo \"TZ=$TZ\""&lt;BR /&gt;to verify this.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 20 Sep 2006 10:18:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866081#M277538</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-20T10:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866082#M277539</link>
      <description>Thanks to everyone for their clarifications so far.&lt;BR /&gt;&lt;BR /&gt;The problem is this:&lt;BR /&gt;&lt;BR /&gt;Two servers, bamse and pumbaa are, as far as I can see, identical, with regards to their timezone settings.&lt;BR /&gt;&lt;BR /&gt;pumbaa#: cat /etc/default/tz&lt;BR /&gt;EST5EDT&lt;BR /&gt;&lt;BR /&gt;bamse#:  cat /etc/default/tz&lt;BR /&gt;EST5EDT&lt;BR /&gt;&lt;BR /&gt;pumbaa#: echo $TZ&lt;BR /&gt;MET-1METDST&lt;BR /&gt;&lt;BR /&gt;bamse#: echo $TZ&lt;BR /&gt;MET-1METDST&lt;BR /&gt;&lt;BR /&gt;pumbaa#: cat /etc/TIMEZONE&lt;BR /&gt;TZ=MET-1METDST&lt;BR /&gt;export TZ&lt;BR /&gt;&lt;BR /&gt;bamse#: cat /etc/TIMEZONE&lt;BR /&gt;TZ=MET-1METDST&lt;BR /&gt;export TZ&lt;BR /&gt;&lt;BR /&gt;Neither set any timezone parameters in root's .profile. &lt;BR /&gt;&lt;BR /&gt;Both source /etc/TIMEZONE in /etc/profile.&lt;BR /&gt;&lt;BR /&gt;Both have the same "dst" and "timezone" kernel parameters, as shown in the original post.&lt;BR /&gt;&lt;BR /&gt;The question is: On bamse, when the date command is run via remsh/rsh/ssh, why is it giving the time in EDT, and not METDST? &lt;BR /&gt;&lt;BR /&gt;Or, put another way: Why does pumbaa respond to:&lt;BR /&gt;&lt;BR /&gt;serverX@root#: rsh pumbaa 'date' &lt;BR /&gt;&lt;BR /&gt;with the expected timezone, and bamse does not? &lt;BR /&gt;&lt;BR /&gt;What other parameters are there that could be causing this issue? When I send the command to pumba, what exactly is happening? Somehow, it seems to be picking up the correct timezone, yet bamse fails to fo this, and may be defaulting to /etc/default/tz.</description>
      <pubDate>Thu, 21 Sep 2006 04:13:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866082#M277539</guid>
      <dc:creator>Jonathan McKee</dc:creator>
      <dc:date>2006-09-21T04:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866083#M277540</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;what happens, if you put&lt;BR /&gt;MET-1METDST&lt;BR /&gt;into /etc/default/tz ?&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 21 Sep 2006 08:20:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866083#M277540</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-21T08:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866084#M277541</link>
      <description>I would simplify your rsh query. As mentioned, your local shell will expand variables like $TZ before sending the result to your remote systems. To avoid this, start with a simple query:&lt;BR /&gt; &lt;BR /&gt;rsh pumbaa 'echo $TZ;date'&lt;BR /&gt;rsh bamse 'echo $TZ;date'&lt;BR /&gt; &lt;BR /&gt;In this case, you are not sending TZ (as defined in your local computer) but are asking what the current environment has. If you do this:&lt;BR /&gt; &lt;BR /&gt;rsh pumbaa "TZ=$TZ date"&lt;BR /&gt;rsh bmase "TZ=$TZ date"&lt;BR /&gt; &lt;BR /&gt;You are taking $TZ from serverX and sending it over to the remote systems. To see what thye shell does to your command line, do this:&lt;BR /&gt; &lt;BR /&gt;echo rsh pumbaa "TZ=$TZ date"&lt;BR /&gt;echo rsh bmase "TZ=$TZ date"&lt;BR /&gt;echo rsh pumbaa 'TZ=$TZ date'&lt;BR /&gt;echo rsh bmase 'TZ=$TZ date'&lt;BR /&gt; &lt;BR /&gt;NOTE: rsh (remsh inside HP-UX) has a limited environment just like cron or at. Try this to see the environments:&lt;BR /&gt; &lt;BR /&gt;rsh pumbaa env&lt;BR /&gt;rsh bamse  env</description>
      <pubDate>Thu, 21 Sep 2006 08:43:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866084#M277541</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-21T08:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866085#M277542</link>
      <description>Peter: &lt;BR /&gt;Tried changing the value in /etc/default/tz but I got no change in the behaviour, on either machine. Would the change require a reboot?</description>
      <pubDate>Thu, 21 Sep 2006 08:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866085#M277542</guid>
      <dc:creator>Jonathan McKee</dc:creator>
      <dc:date>2006-09-21T08:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866086#M277543</link>
      <description>Bill:&lt;BR /&gt;&lt;BR /&gt;Yep I tried that:&lt;BR /&gt;&lt;BR /&gt;serverX@root#: rsh pumbaa "env"&lt;BR /&gt;_=/usr/bin/env&lt;BR /&gt;PATH=/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/contrib/bin:/usr/local/bin:&lt;BR /&gt;LOGNAME=root&lt;BR /&gt;SHELL=/sbin/sh&lt;BR /&gt;HOME=/&lt;BR /&gt;PWD=/&lt;BR /&gt;TZ=MET-1METDST&lt;BR /&gt;&lt;BR /&gt;serverXroot#: rsh bamse "env"&lt;BR /&gt;_=/usr/bin/env&lt;BR /&gt;PATH=/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/contrib/bin:/usr/local/bin:&lt;BR /&gt;LOGNAME=root&lt;BR /&gt;SHELL=/sbin/sh&lt;BR /&gt;HOME=/&lt;BR /&gt;PWD=/&lt;BR /&gt;TZ=EST5EDT&lt;BR /&gt;&lt;BR /&gt;Why is this so, when the two servers are otherwise equal, as far as I have been able to ascertain?&lt;BR /&gt;&lt;BR /&gt;Why does bamse set TZ to EST5DST, even when /etc/default/tz is changed? Why isn't pumbaa showing the same behaviour? Pumbaa isn't defaulting to /etc/default/tz. Why not?</description>
      <pubDate>Thu, 21 Sep 2006 08:55:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866086#M277543</guid>
      <dc:creator>Jonathan McKee</dc:creator>
      <dc:date>2006-09-21T08:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866087#M277544</link>
      <description>This is sounding like a startup problem where inetd has inherited the default TZ value from /etc/rc.config, the script that sources all the files in /etc/rc.config.d/*. There is also a script /sbin/rc which sets the default TZ value. This default value should have been overridden by the rc.config script at bootup. &lt;BR /&gt; &lt;BR /&gt;So check /etc/TIMEZONE to see that it sources correctly on bamse:&lt;BR /&gt; &lt;BR /&gt;. /etc/TIMEZONE&lt;BR /&gt; &lt;BR /&gt;The key is that if TZ is not set, the value of /etc/default/tz is used. TZ would not be set if the /etc/TIMEZONE file could not be sourced. Also check the tz file for readability. The man page for ctime gives the precendence information.&lt;BR /&gt; &lt;BR /&gt;However, if inetd inherited TZ=EST5EDT then all networking daemons run by inetd will have that TZ value, thus pointing to a bootup problem in the /sbin scripts.</description>
      <pubDate>Thu, 21 Sep 2006 10:14:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866087#M277544</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-21T10:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone discrepancies</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866088#M277545</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;to verify this, you could check against sshd (if configured):&lt;BR /&gt;- check first, if the symtoms are the same in rlogin and ssh connections&lt;BR /&gt;- if ssh is OK, you should scan the daemon startup(s) at boottime, like Bill suggested.&lt;BR /&gt;&lt;BR /&gt;- restart one service of sshd or inetd&lt;BR /&gt;- check again&lt;BR /&gt;&lt;BR /&gt;Check additionally for messages in rc.log.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 21 Sep 2006 11:23:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/timezone-discrepancies/m-p/3866088#M277545</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-21T11:23:26Z</dc:date>
    </item>
  </channel>
</rss>

