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:
parent
1a615f8ad8
commit
4cc810faf3
2 changed files with 14 additions and 2 deletions
|
|
@ -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 ($@) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue