dda has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks!

Is it possible to get the difference from GMT in hours? My $ENV{TZ } is not set, however, the following code shows some values:

#!/usr/bin/perl -w use strict; use POSIX; my ($std, $dst) = POSIX::tzname(); print "std: $std\n"; print "dst: $dst\n"; print "TZ: " . ($ENV{TZ} || "Unset") . "\n";
Result is:
on Win32 machine: std: Russian Standard Time dst: Russian Daylight Time TZ: Unset on linux machine: std: GMT dst: GMT TZ: Unset
Where does perl get those values? At he same time, php code:
<?php $stz = date("Z"); echo $stz/60/60; ?>
shows 4..