in reply to Datestamps/epochs and other fun stuff

Hello,

Maybe this is what you're looking for:

use warnings; use strict; use DateTime::Format::Strptime; my $str = 'Jul 9 2009 11:55 PM'; my $parser = DateTime::Format::Strptime->new( pattern => '%b %d %Y %I:%M %p', time_zone => 'America/New_York', ); my $date = $parser->parse_datetime( $str ); print $date->epoch, "\n";

regards,

Replies are listed 'Best First'.
Re^2: Datestamps/epochs and other fun stuff
by vxp (Pilgrim) on Jul 10, 2009 at 03:14 UTC
    YES!!

    much appreciated!