diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-03-18 09:53:52 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-03-18 09:53:52 +0000 |
commit | 746bdb56f289097c199c483025cc5427febae81e (patch) | |
tree | 584df71a445da1eead3f2bc702e60110410a0561 | |
parent | 4508ebf108b85b737b637cd72a39a424f0e86bc8 (diff) |
Handle case of no Received lines better
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@593 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-x | awm | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -139,8 +139,9 @@ sub gettime($) { my $mail = new Mail::Internet($maillines); my $header = $mail->head(); my $received = $header->get('Received', 0); - my ($date) = $received =~ /;([^;]+)$/ if defined $received; - my $time = parsedate($date) if defined $date; + my ($date, $time); + ($date) = $received =~ /;([^;]+)$/ if defined $received; + $time = parsedate($date) if defined $date; unless (defined $time) { $QUIET or warn ("$PROGRAM_NAME: Falling back to date header in $file\n"); $date = $header->get('Date'); |