Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: why are timegm and timelocal returning the same epoch seconds values

by karlgoethebier (Vicar)
on May 15, 2013 at 10:55 UTC ( #1033661=note: print w/ replies, xml ) Need Help??


in reply to Re: why are timegm and timelocal returning the same epoch seconds values
in thread why are timegm and timelocal returning the same epoch seconds values

Update2:

use DateTime; use DateTime::TimeZone; my $dt = DateTime->new( year => 2013, month => 4, day => 15, hour => 12, minute => 45, second => 47, time_zone => 'Europe/Berlin', ); my $tz = DateTime::TimeZone->new( name => 'US/Pacific' ); my $offset = $tz->offset_for_datetime($dt); print qq($offset\n); print DateTime::TimeZone->offset_as_string( $offset ) . qq(\n); print qq($dt->hour\n); $dt->set_time_zone( 'US/Pacific' ); print qq($dt->hour\n);

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»


Comment on Re^2: why are timegm and timelocal returning the same epoch seconds values
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2015-07-07 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls