Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 lurking in the Monastery: (11)
As of 2014-09-17 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (95 votes), past polls