"Balázs Szabó (dLux)" <[EMAIL PROTECTED]> wrote: > What I did in my module is the following: > > delete $ENV{TZ}; > tzset(); > ($a, $b) = tzname(); > > $a should contain the local timezone (according to the documentation of > the tzset manual), although it is UTC always. What I suspect is that > when I delete the TZ variable from the environment, it does not really > delete it. > > How I can make sure that this variable is deleted?
I had to use Env::C to accomplish this; sub set_tz_env { my($class, $tz) = @_; Env::C::setenv('TZ', $tz); $ENV{TZ} = $tz; POSIX::tzset(); } Cheers, Tyler