<?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: Wrong time with su command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947859#M796161</link>
    <description>The time and date on HP-UX is always kept as GMT or UTC time. It is then translated to a particular timezone using the TZ variable. When you change user ID, a lot depends on whether you use the optional (but very important) - option (as in su - root). If you do not use -, then your new shell will have the privileges of the new user but the environment (including variables like TZ) will be unchanged, which is not good.&lt;BR /&gt; &lt;BR /&gt;If you use the - option, then a login environment is created including running the new user's profile. Your date command under the new user will correspond to the current setting of TZ. Now this is the simple explanation. If you you are using Xwindows, the defaults in Xwindows will lead to unexpected results. Are you simply running a telnet connection and typing the su command or is it more complicated?</description>
    <pubDate>Tue, 20 Dec 2005 08:10:26 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2005-12-20T08:10:26Z</dc:date>
    <item>
      <title>Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947855#M796157</link>
      <description>This may be a easy one:&lt;BR /&gt;&lt;BR /&gt;when switching user with su command the system time is wrong by 6 hours with the other user. &lt;BR /&gt;&lt;BR /&gt;Checked different user´s profiles but found nothing wrong there, e.g. with time zone. The system is hp-ux 11.11&lt;BR /&gt;&lt;BR /&gt;Thanks for any advice.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2005 08:00:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947855#M796157</guid>
      <dc:creator>Viljami</dc:creator>
      <dc:date>2005-12-20T08:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947856#M796158</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Start as 'root' and echo the timezone variable:&lt;BR /&gt;&lt;BR /&gt;# echo ${TZ}&lt;BR /&gt;&lt;BR /&gt;Now do:&lt;BR /&gt;&lt;BR /&gt;# su username  # ...and echo ${TZ}&lt;BR /&gt;# su - username #...and echo ${TZ}&lt;BR /&gt;&lt;BR /&gt;In the second case, the user's profile should run.  Look in there for a different setting of TZ.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 20 Dec 2005 08:05:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947856#M796158</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-20T08:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947857#M796159</link>
      <description>I would have to assume that it has to be something in the profile.  Try switching with and without the "-" option.  Without it, the profile won't be executed and, I would think, the time should be the same.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 20 Dec 2005 08:07:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947857#M796159</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-12-20T08:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947858#M796160</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please check your tz file in /etc/default.&lt;BR /&gt;Check if your Timezone in there is coorect.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Darrel</description>
      <pubDate>Tue, 20 Dec 2005 08:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947858#M796160</guid>
      <dc:creator>Darrel Louis</dc:creator>
      <dc:date>2005-12-20T08:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947859#M796161</link>
      <description>The time and date on HP-UX is always kept as GMT or UTC time. It is then translated to a particular timezone using the TZ variable. When you change user ID, a lot depends on whether you use the optional (but very important) - option (as in su - root). If you do not use -, then your new shell will have the privileges of the new user but the environment (including variables like TZ) will be unchanged, which is not good.&lt;BR /&gt; &lt;BR /&gt;If you use the - option, then a login environment is created including running the new user's profile. Your date command under the new user will correspond to the current setting of TZ. Now this is the simple explanation. If you you are using Xwindows, the defaults in Xwindows will lead to unexpected results. Are you simply running a telnet connection and typing the su command or is it more complicated?</description>
      <pubDate>Tue, 20 Dec 2005 08:10:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947859#M796161</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-12-20T08:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947860#M796162</link>
      <description>Please post for each user:&lt;BR /&gt;&lt;BR /&gt;env | grep TZ&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2005 09:01:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947860#M796162</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2005-12-20T09:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong time with su command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947861#M796163</link>
      <description>Thanks for your answers!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Dec 2005 03:45:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/wrong-time-with-su-command/m-p/4947861#M796163</guid>
      <dc:creator>Viljami</dc:creator>
      <dc:date>2005-12-21T03:45:37Z</dc:date>
    </item>
  </channel>
</rss>

