DateTime::Format::Strptime takes date/time strings and parses them into DateTime objects.
#!/usr/bin/perl
use strict;
use warnings;
use DateTime::Format::Strptime;
my $parser = DateTime::Format::Strptime->new(
pattern => '%B %d, %Y %I:%M %p %Z',
on_error => 'croak',
);
my $dt = $parser->parse_datetime('October 28, 2011 9:00 PM PDT');
print "$dt\n";
The character sequences used in the pattern are POSIX standard. See ‘man strftime’ for details.