Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
We don't bite newbies here... much
 
PerlMonks  

Converting datetime string to valid localtime value (seconds)

by vladb (Vicar)
on May 16, 2003 at 18:10 UTC ( #258721=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Date::Manip;
    ...
        my $time = Date_SecsSince1970($mon{$mon}, $d, $y, $h, $mn, $s) + $
    +zf*$zsec;
        print "parsed time: ".localtime($time)."; original: $date $zone\n"
    +;
    }
    
  2. or download this
    (1.2.3.4, 15/May/2003:01:05:02, -0600, "GET /foobar")
    Log date values: 5, 15, 2003, 01, 05, 02
    *** ERROR ***>> Date_SecsSince1970(5, 15, 2003, 01, 05, 02) = Wed May 
    +14 18:05:02 2003 <<***
    parsed time: Wed May 14 12:05:02 2003; original: 15/May/2003:01:05:02 
    +-0600
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-04-20 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (487 votes), past polls