about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-06 04:15:38 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-06 04:51:41 +0000
commit35ac61764499c272d2760de2b2a432be412ecede (patch)
tree4902a8ce21a73c4e3f9b7724fcbadfd5e3038cf7 /lib/PublicInbox/View.pm
parent8515f32bd403cae734b2fed534a6708758d7949a (diff)
downloadpublic-inbox-35ac61764499c272d2760de2b2a432be412ecede.tar.gz
The first Received: header is believable since it typically
hits the user's mail server and can be treated as relatively
trustworthy.  We still show the Date: in per-message (permalink)
views, which may expose users for having incorrect Date:
headers, but all the ISO YYYY-MM-DD dates we display will
match what we see.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index aad67488..f811f4f0 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -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;