]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntp.t
daemon: fix SIGUSR2 upgrade with -W0 (no workers)
[public-inbox.git] / t / nntp.t
index 938eef385bb5f2b12e3abccd5954d9db183c2f0c..ff72ec6a001cabc92d725154608a7bda2956702a 100644 (file)
--- a/t/nntp.t
+++ b/t/nntp.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -68,7 +68,7 @@ use_ok 'PublicInbox::Inbox';
                my ($date, $time, $gmt) = @_;
                my $m = join(' ', @_);
                my $ts = PublicInbox::NNTP::parse_time(@_);
-               my @t = gmtime($ts);
+               my @t = $gmt ? gmtime($ts) : localtime($ts);
                my ($d, $t) = split(' ', strftime('%Y%m%d %H%M%S', @t));
                if (length($date) != 8) { # Net::NNTP uses YYMMDD :<
                        $d =~ s/^[0-9]{2}//;