Perl question

Victor Odhner plug-devel@lists.PLUG.phoenix.az.us
Tue May 22 05:23:01 2001


Carl Parrish wrote:
> 
> Okay apparently I still didn't give enough information. I don't want the
> actually system time on these machines to change. ... I want
> my application on all of these machines to read EST. So is there some
> way for to set the TZ (or some other variable ) to EST for the
> *application* while leaving everything else on the box to the current
> local time?

Our messages may be passing in the mail, leading to some repetition.

To quote Kevin yet again, just put

    $ENV{TZ} = "EST";

near the beginning of your perl script.

Or export TZ='EST' in a shell script that sets the environment
for the perl script.  (Many of my perl programs are called by
little shell scripts that load and adjust the appropriate
environment files.)

Then, be sure to DISPLAY the contents of $ENV{ TZ }
with the time, so folks will be reminded what zone it's for.

Vic