<?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 TZ difficulty for csh in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tz-difficulty-for-csh/m-p/2556079#M28764</link>
    <description>problem:&lt;BR /&gt;at times when users with the /usr/bin/csh shell login to our L2000 running 11.00 the date command is 3 hours off. time is not the problem since NTP is running properly, but the timezone is a problem.&lt;BR /&gt;&lt;BR /&gt;my unsuccessful fix:&lt;BR /&gt;i was hard to investigate because users would complain, logout, inform me, login back in, and then the date was giving the correct time again. finally i was able to have a user contact me as it was happening. and below is what i did a month ago but then today another user brought the issue to my attention!!!&lt;BR /&gt;   date&lt;BR /&gt;      Tue Jul 10 00:34:15 EDT 2001&lt;BR /&gt;   env | grep TZ&lt;BR /&gt;      TZ=&lt;BR /&gt;      NOTE: i see that the TZ is not set to PST8PDT ...we are in Portland Oregon&lt;BR /&gt;   su&lt;BR /&gt;   cp -p /etc/csh.login /tmp&lt;BR /&gt;   vi /etc/csh.login&lt;BR /&gt;   diff /tmp/csh.login /etc/csh.login&lt;BR /&gt;      &amp;lt;               setenv TZ `/usr/bin/sh -c '. /etc/TIMEZONE ; echo $TZ' ` # set the TZ variable&lt;BR /&gt;      &amp;gt;               setenv TZ `cat /etc/TIMEZONE | line | sed -e 's/TZ=//'`&lt;BR /&gt;      &amp;lt;               setenv TZ MST7MDT      # change this for local time.&lt;BR /&gt;      &amp;gt;               setenv TZ PST8PDT&lt;BR /&gt;      NOTE: this should of done the trick! in my opinion cat is more reliable than using a /usr/bin/sh when trying to login/setup a /usr/bin/csh user&lt;BR /&gt;&lt;BR /&gt;question:&lt;BR /&gt;why didn't the above work? looking further into this last complaint i notice that the user has a $HOME/.login file but it contains just one line&lt;BR /&gt;   cat $HOME/.login&lt;BR /&gt;      #!./frog.sh&lt;BR /&gt;      NOTE: there is no file $HOME/frog.sh&lt;BR /&gt;also i looked at the user's $HOME/.cshrc and found no refernce of TZ&lt;BR /&gt;   fgrep TZ .[a-z]*&lt;BR /&gt;      NOTE: returned nothing&lt;BR /&gt;thx for taking the time to consider my concern...</description>
    <pubDate>Tue, 24 Jul 2001 03:51:20 GMT</pubDate>
    <dc:creator>Marc Ahrendt</dc:creator>
    <dc:date>2001-07-24T03:51:20Z</dc:date>
    <item>
      <title>TZ difficulty for csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tz-difficulty-for-csh/m-p/2556079#M28764</link>
      <description>problem:&lt;BR /&gt;at times when users with the /usr/bin/csh shell login to our L2000 running 11.00 the date command is 3 hours off. time is not the problem since NTP is running properly, but the timezone is a problem.&lt;BR /&gt;&lt;BR /&gt;my unsuccessful fix:&lt;BR /&gt;i was hard to investigate because users would complain, logout, inform me, login back in, and then the date was giving the correct time again. finally i was able to have a user contact me as it was happening. and below is what i did a month ago but then today another user brought the issue to my attention!!!&lt;BR /&gt;   date&lt;BR /&gt;      Tue Jul 10 00:34:15 EDT 2001&lt;BR /&gt;   env | grep TZ&lt;BR /&gt;      TZ=&lt;BR /&gt;      NOTE: i see that the TZ is not set to PST8PDT ...we are in Portland Oregon&lt;BR /&gt;   su&lt;BR /&gt;   cp -p /etc/csh.login /tmp&lt;BR /&gt;   vi /etc/csh.login&lt;BR /&gt;   diff /tmp/csh.login /etc/csh.login&lt;BR /&gt;      &amp;lt;               setenv TZ `/usr/bin/sh -c '. /etc/TIMEZONE ; echo $TZ' ` # set the TZ variable&lt;BR /&gt;      &amp;gt;               setenv TZ `cat /etc/TIMEZONE | line | sed -e 's/TZ=//'`&lt;BR /&gt;      &amp;lt;               setenv TZ MST7MDT      # change this for local time.&lt;BR /&gt;      &amp;gt;               setenv TZ PST8PDT&lt;BR /&gt;      NOTE: this should of done the trick! in my opinion cat is more reliable than using a /usr/bin/sh when trying to login/setup a /usr/bin/csh user&lt;BR /&gt;&lt;BR /&gt;question:&lt;BR /&gt;why didn't the above work? looking further into this last complaint i notice that the user has a $HOME/.login file but it contains just one line&lt;BR /&gt;   cat $HOME/.login&lt;BR /&gt;      #!./frog.sh&lt;BR /&gt;      NOTE: there is no file $HOME/frog.sh&lt;BR /&gt;also i looked at the user's $HOME/.cshrc and found no refernce of TZ&lt;BR /&gt;   fgrep TZ .[a-z]*&lt;BR /&gt;      NOTE: returned nothing&lt;BR /&gt;thx for taking the time to consider my concern...</description>
      <pubDate>Tue, 24 Jul 2001 03:51:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tz-difficulty-for-csh/m-p/2556079#M28764</guid>
      <dc:creator>Marc Ahrendt</dc:creator>
      <dc:date>2001-07-24T03:51:20Z</dc:date>
    </item>
  </channel>
</rss>

