You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tyler <tf...@webmetrics.com> on 2006/10/03 20:06:00 UTC
RE: Using ENV{'TZ'} in mod_perl
Hello,
I previously requested some help with setting $ENV{TZ} and using it's value
to modify the output of localtime (i.e. Make it time zone specific). The
suggested solution was to use POSIX::tzset() because my perl installation
was compiled with thread support. So this helped, however I'm still not
able to use $ENV{TZ} to modify the behavior of localtime in a cgi script.
Is there some sort of limitation with cgi scripts run under mod_perl
(specifically: PerlRun) that would prevent this from working?
Thank you,
Tyler Fullerton.
_____
From: Garrett, Philip (MAN-Corporate) [mailto:Philip.Garrett@manheim.com]
Sent: Wednesday, September 20, 2006 11:25 AM
To: Tyler; modperl@perl.apache.org
Subject: RE: Using ENV{'TZ'} in mod_perl
If you're using a perl compiled with thread support, you'll need to call
POSIX::tzset() after setting $ENV{TZ}.
_____
From: Tyler [mailto:tfullert@webmetrics.com]
Sent: Wednesday, September 20, 2006 2:09 PM
To: modperl@perl.apache.org
Subject: Using ENV{'TZ'} in mod_perl
Hello,
I have a script that use to use the value in the environment variable
ENV{'TZ'} to modify the output of the perl builtin localtime. In other
words, I'd do something like this:
$ENV{'TZ'} = 'US/Eastern';
@time = localtime();
This use to give me the localtime in whatever timezone was in ENV{'TZ'}.
However, I have since then switched to using mod_perl (more specifically the
PerlRun module) and now this code no longer works (i.e. $ENV{'TZ'} doesn't
have any affect on localtime). I've tried various modifications to my
mod_perl install (such as configuring PerlPassEnv, etc) but still can't get
it to work.
Does anyone have any recommendations, or thoughts?
Thank you in advance,
Tyler Fullerton.
__________ NOD32 1.1764 (20060920) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com