The following script will work beautifully when run from the command line.
When called as a CGI under mod_perl_2 (1.99.08) it will output identical dates for all the different time zones!
Is this a known problem???
#! /opt/perl/bin/perl -w
use strict;
use POSIX;
print
"Content-type: text/plain\n\n",
"Time zone stuff\n",
"***************\n",
"\n";
my $now = time;
$ENV{TZ} = "Europe/London"; POSIX::tzset();
print "Time in Europe/London is " . localtime($now) . " +OK\n";
$ENV{TZ} = "Europe/Paris"; POSIX::tzset();
print "Time in Europe/Paris is " . localtime($now) . " +OK\n";
$ENV{TZ} = "America/Chicago"; POSIX::tzset();
print "Time in America/Chicago is " . localtime($now) . " +OK\n";
exit;