about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchView.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-12-05 02:08:01 +0000
committerEric Wong <e@80x24.org>2015-12-05 02:16:55 +0000
commitc0805dfcd9a7b077c6ac4fa2cec31af60d50133e (patch)
treefb5036e6d67ac0e1a58b91d1968955833b32cc5a /lib/PublicInbox/SearchView.pm
parent5bf2748a96a2ef3d1c49ff5b5354c65fd82b7545 (diff)
downloadpublic-inbox-c0805dfcd9a7b077c6ac4fa2cec31af60d50133e.tar.gz
Avoid the visual noise entirely by using a space instead.

I sometimes have difficulty distinguishing '0' from '8' while
other users may mistake it for an 'O' character.  Most digital
clocks I've seen will omit displaying a leading zero for the
hour, too.

This may also save transfer time by allowing better compression
(since there is a space between the date and time anyways) and
perhaps reduce client rendering time on some displays.

We'll leave the leading zero for minutes since that seems pretty
standard for digital clocks.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r--lib/PublicInbox/SearchView.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index a15af55e..7f790902 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -10,7 +10,6 @@ use PublicInbox::Hval;
 use PublicInbox::View;
 use PublicInbox::MID qw(mid2path mid_clean);
 use Email::MIME;
-use POSIX qw/strftime/;
 our $LIM = 50;
 
 sub sres_top_html {
@@ -69,11 +68,11 @@ sub dump_mset {
                 my $s = PublicInbox::Hval->new_oneline($smsg->subject);
                 my $f = $smsg->from_name;
                 $f = PublicInbox::Hval->new_oneline($f)->as_html;
-                my $d = strftime('%Y-%m-%d %H:%M', gmtime($smsg->ts));
+                my $ts = PublicInbox::View::fmt_ts($smsg->ts);
                 my $mid = PublicInbox::Hval->new_msgid($smsg->mid)->as_href;
                 $$res .= qq{$rank. <b><a\nhref="$mid/">}.
                         $s->as_html . "</a></b>\n";
-                $$res .= "$pfx  - by $f @ $d UTC [$pct%]\n\n";
+                $$res .= "$pfx  - by $f @ $ts UTC [$pct%]\n\n";
         }
 }