diff options
author | Eric Wong <e@80x24.org> | 2016-12-17 12:04:11 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-17 22:40:28 +0000 |
commit | 0ccce545505026019fe2fa4ed7da6f329bf91be1 (patch) | |
tree | 13777340f163f9e3fccf21abbb5228af4b00121e | |
parent | 5f3046879e1aa713e95b46795fc49c9f83923750 (diff) | |
download | public-inbox-0ccce545505026019fe2fa4ed7da6f329bf91be1.tar.gz |
We only generate the ->date once in NNTP, so creating the hash entry is a waste.
-rw-r--r-- | lib/PublicInbox/SearchMsg.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 4c65fbe0..d62f02c8 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -76,13 +76,10 @@ my @MoY = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); sub date ($) { my ($self) = @_; - my $date = __hdr($self, 'date'); - return $date if defined $date; my $ts = $self->{ts}; return unless defined $ts; my ($sec, $min, $hour, $mday, $mon, $year, $wday) = gmtime($ts); - $self->{date} = "$DoW[$wday], ". - sprintf("%02d $MoY[$mon] %04d %02d:%02d:%02d +0000", + "$DoW[$wday], " . sprintf("%02d $MoY[$mon] %04d %02d:%02d:%02d +0000", $mday, $year+1900, $hour, $min, $sec); } |