dda has asked for the wisdom of the Perl Monks concerning the following question:
Is it possible to get the difference from GMT in hours? My $ENV{TZ } is not set, however, the following code shows some values:
Result is:#!/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";
Where does perl get those values? At he same time, php code:on Win32 machine: std: Russian Standard Time dst: Russian Daylight Time TZ: Unset on linux machine: std: GMT dst: GMT TZ: Unset
shows 4..<?php $stz = date("Z"); echo $stz/60/60; ?>
--dda
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get TZ difference?
by adrianh (Chancellor) on Jun 28, 2003 at 10:50 UTC | |
|
Re: How to get TZ difference?
by BrowserUk (Patriarch) on Jun 28, 2003 at 14:09 UTC | |
|
Re: How to get TZ difference?
by hsweet (Pilgrim) on Jun 28, 2003 at 12:04 UTC | |
by sgifford (Prior) on Jun 28, 2003 at 16:56 UTC | |
by sgifford (Prior) on Jun 28, 2003 at 17:55 UTC | |
by dda (Friar) on Jul 06, 2003 at 06:38 UTC | |
by hsweet (Pilgrim) on Jun 28, 2003 at 22:51 UTC | |
by Anonymous Monk on Sep 08, 2014 at 09:42 UTC | |
by Anonymous Monk on Sep 14, 2016 at 18:37 UTC |