Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Converting datetime string to valid localtime value (seconds)

by vladb (Vicar)
on May 16, 2003 at 18:10 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-24 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found