From: Eric Wong Date: Sun, 29 May 2016 02:57:57 +0000 (+0000) Subject: searchmsg: all timestamps stored in Xapian are UTC X-Git-Tag: v1.0.0~475 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;ds=sidebyside;h=adb070ef0cf3185dbccb5a606c149ebb2e2eaadd;p=public-inbox.git searchmsg: all timestamps stored in Xapian are UTC We cannot have strftime using the local timezone for %z. This fixes output when a server is not running UTC. --- diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 0fb2a07e..caebe372 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -80,7 +80,7 @@ sub date ($) { return $date if defined $date; my $ts = $self->{ts}; return unless defined $ts; - $self->{date} = strftime('%a, %d %b %Y %T %z', gmtime($ts)); + $self->{date} = strftime('%a, %d %b %Y %T +0000', gmtime($ts)); } sub from ($) {