From: Eric Wong Date: Sun, 30 Jun 2019 22:24:25 +0000 (+0000) Subject: t/perf-nntpd.t: fix off-by-one if NEWNEWS_DATE is unset X-Git-Tag: v1.2.0~134 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=0b84d8600368c67080e683e415f7e502a343316b t/perf-nntpd.t: fix off-by-one if NEWNEWS_DATE is unset 20190431 isn't real, NNTP.pm failed to parse it when our test client sent it. --- diff --git a/t/perf-nntpd.t b/t/perf-nntpd.t index 3ca1ce33..ce3cc409 100644 --- a/t/perf-nntpd.t +++ b/t/perf-nntpd.t @@ -108,7 +108,7 @@ diag "XHDR From ". timestr($t) . " for $n"; my $date = $ENV{NEWNEWS_DATE}; unless ($date) { my (undef, undef, undef, $d, $m, $y) = gmtime(time - 30 * 86400); - $date = sprintf('%04u%02u%02u', $y + 1900, $m, $d); + $date = sprintf('%04u%02u%02u', $y + 1900, $m + 1, $d); diag "NEWNEWS_DATE undefined, using $date"; } $t = timeit(1, sub {