From ea0e8649f90d1fd0850a41c0ca16642faadf4f14 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 29 Jul 2015 18:09:41 +0000 Subject: view: simplify timestamp generation It's seems less ambiguous to parse a consistent in quiet lists where messages are sparse. --- lib/PublicInbox/View.pm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index bc4c7ac7..c65e4684 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -68,14 +68,7 @@ sub index_entry { my $pfx = (' ' x $level); my $ts = $mime->header('X-PI-Date'); - my $time = '%H:%M UTC'; - my $fmt = $time; - if ($now > ($ts + (365 * 24 * 60 * 60))) { - # doesn't have to be exactly 1 year - $fmt = '%Y/%m/%d ' . $time; - } elsif ($now > ($ts + (24 * 60 * 60))) { - $fmt = '%m/%d ' . $time; - } + my $fmt = '%Y-%m-%d %H:%M UTC'; $ts = POSIX::strftime($fmt, gmtime($ts)); $rv .= "$pfx$subj\n$pfx"; -- cgit v1.2.3-24-ge0c7