Re: Re(2): ASClock shows wrong time

Benjamin J. Tracy (
Thu, 8 Oct 1998 08:49:32 -0400 (EDT)

> That sounds really cool... and I'll try it when I get home, but I'm just
> curious, what is TZ, and why doesn't it affect the times system-wide?
> Thanks for the help!
>   -Ron

TZ is what's called an environment variable.  Environment variables only
make a difference in the shell that they are set in, not system wide, so
setting TZ in the script makes that particular timezone valid only for
that script.  Since the script will promptly exit once asclock is started
you should notice no other changes in the behavior of the system.

I figured this out a while ago because I had to keep the default timezone
on my old HP box at GMT, but I wanted to see eastern time on my clock..

BTW - The example script I gave only worked for pacific time because that
was what the question asked for.  For anybody else with this problem in
other timezones replace PST8PDT with:

MST7MDT for mountain time
CST6CDT for central time
EST5EDT for eastern time

If you live in one of those weird places that don't go to daylight time,
leave off the the letters after the number.  If you live outside the US,
unfortunately I have no idea! :-)

Hope this helps!