Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Converting to epoch time.

by duct_tape (Hermit)
on Mar 30, 2005 at 23:34 UTC ( #443644=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use DateTime::Format::Strptime;
    use strict;
    ...
    my $parser   = DateTime::Format::Strptime->new(pattern => '%Y-%m-%d %H
    +:%M:%S');
    my $dt       = $parser->parse_datetime($datetime);
    print $dt->epoch;
    
  2. or download this
    use DateTime::Format::HTTP;
    use strict;
    ...
    my $datetime = "2005-03-28 12:00:00";
    my $dt       = DateTime::Format::HTTP->parse_datetime($datetime);
    print $dt->epoch;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2019-10-21 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?