]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
favor Received: date over Date: header globally
[public-inbox.git] / lib / PublicInbox / View.pm
index aad674882d0de236b0dcdec070292581ddc823dd..f811f4f0e3f9d61ea1665b687a386013ae2a8cbe 100644 (file)
@@ -6,7 +6,7 @@
 package PublicInbox::View;
 use strict;
 use warnings;
-use Date::Parse qw/str2time/;
+use PublicInbox::MsgTime qw(msg_timestamp);
 use PublicInbox::Hval qw/ascii_html obfuscate_addrs/;
 use PublicInbox::Linkify;
 use PublicInbox::MID qw/mid_clean id_compress mid_mime mid_escape/;
@@ -732,12 +732,6 @@ sub load_results {
        $srch->retry_reopen(sub { [ map { $_->mid; $_ } @$msgs ] });
 }
 
-sub msg_timestamp {
-       my ($hdr) = @_;
-       my $ts = eval { str2time($hdr->header('Date')) };
-       defined($ts) ? $ts : 0;
-}
-
 sub thread_results {
        my ($msgs, $srch) = @_;
        require PublicInbox::SearchThread;