3.8p1 not honoring TZ environment variable

Tom Orban TORBAN at do.usbr.gov
Sat Mar 6 06:34:10 EST 2004


Hello,

I just built openssh 3.8p1 on an HP-UX 11i machine.  All looks well
except for the timezone.  I'm noticing now that when it logs stuff to
syslog, it's off by 2 hours for me.  What I've figured is this:

My timezone is MST7MDT (mountain time).
The timezone in /etc/default/tz is EST5EDT  (eastern time).

There's a 2 hour difference between  mountain & eastern time.

What I'm thinking is the real problem, is that it is not looking at the
TZ environment variable to get its own setting for the timezone when it
starts up, and so it just uses the default in /etc/default/tz.  This
behavior is definitely new to 3.8p1.  I was previously running 3.7.1p2,
which did not exhibit this behavior.  Of course, my workaround is to
change the value in /etc/default/tz, but it seems like it should be able
to get the right value out of the TZ environment variable.

If I'm not mistaken, sshd looks for the value of TZ with a getenv call
in session.c.  Not much magic there, but it doesn't seem to be working.

Thanks.

-Tom




More information about the openssh-unix-dev mailing list