Beefy Boxes and Bandwidth Generously Provided by pair Networks
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2016-12-10 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (160 votes). Check out past polls.