SKIP: { skip "can't register TZ changes in a pseudo-fork", 2 if $is_pseudo_fork; use POSIX; warn "1 POSIX::strftime: ", POSIX::strftime("%Z\n", localtime); local $ENV{TZ} = "EST5"; warn "2 POSIX::strftime: ", POSIX::strftime("%Z\n", localtime); Time::Piece::_tzset(); # register the environment change warn "3 POSIX::strftime: ", POSIX::strftime("%Z\n", localtime); my $lt = localtime; cmp_ok(scalar($lt->tzoffset), 'eq', '-18000'); cmp_ok($lt->strftime("%Z"), 'eq', 'EST'); }