]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchmsg: all timestamps stored in Xapian are UTC
authorEric Wong <e@80x24.org>
Sun, 29 May 2016 02:57:57 +0000 (02:57 +0000)
committerEric Wong <e@80x24.org>
Sun, 29 May 2016 02:58:08 +0000 (02:58 +0000)
We cannot have strftime using the local timezone for %z.
This fixes output when a server is not running UTC.

lib/PublicInbox/SearchMsg.pm

index 0fb2a07e43f5818f30acfe4ba4cfc8fdec60ce65..caebe3729d4cf3a038c75c05736d6fd3045d1dca 100644 (file)
@@ -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 ($) {