Added tests for mailToEpoch.

Removed the default setting for mailToEpoch that would have assigned
the epoch to the mail field and automatically caused the method
to fail, returning undef.
This commit is contained in:
Colin Kuskie 2007-04-09 18:01:26 +00:00
parent 1a615f8ad8
commit 4cc810faf3
2 changed files with 14 additions and 2 deletions

View file

@ -723,7 +723,7 @@ A date formatted according to RFC2822/822.
sub mailToEpoch {
my $self = shift;
my $date = shift || time();
my $date = shift;
my $parser = DateTime::Format::Mail->new->loose;
my $dt = eval {$parser->parse_datetime($date)};
if ($@) {