Changeset 1814

Show
Ignore:
Timestamp:
11/06/06 16:17:32
Author:
miyagawa
Message:

CustomFeed?::POP3: be more liberal to handle Date format

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/CustomFeed/POP3.pm

    r1172 r1814  
    6767    $entry->title($email->header('Subject')); 
    6868    $entry->author($email->header('From')); 
    69     $entry->date(Plagger::Date->parse($format, $email->header('Date'))) if $email->header('Date'); 
     69 
     70    if (my $date = $email->header('Date')) { 
     71        my $dt = eval { Plagger::Date->parse($format, $date) } 
     72            || Plagger::Date->parse_dwim($date); 
     73        $entry->date($dt) if $dt; 
     74    } 
     75 
    7076    $entry->body($self->get_body($email)); 
    7177