Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: convert my date into local time or epoch time

by chrestomanci (Priest)
on Oct 28, 2013 at 12:01 UTC ( #1059963=note: print w/ replies, xml ) Need Help??


in reply to convert my date into local time or epoch time

DateTime::Format::W3CDTF on CPAN can convert that format for you. Then just call epoch() on the resultant DateTime object.

eg:

my $time = DateTime::Format::W3CDTF->parse_datetime("2007-12-24T18:21Z +"); print "epoch time: ".$time->epoch();


Comment on Re: convert my date into local time or epoch time
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2015-07-31 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls