http://qs321.pair.com?node_id=251074


in reply to %ENV{TZ} does not always affect CORE::localtime() under multi-threaded perl

This is a problem on the C level, I believe. The localtime(3) call does not always check the current value of the TZ environment variable. To force it to do so, POSIX-compliant systems should use the tzset(3) call.

You can imitate this in perl via:

use POSIX; $\ = "\n"; $ENV{TZ} = "EST"; POSIX::tzset(); print scalar localtime(); $ENV{TZ} = "DST"; POSIX::tzset(); print scalar localtime();

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'