]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/perf-nntpd.t: fix off-by-one if NEWNEWS_DATE is unset
authorEric Wong <e@80x24.org>
Sun, 30 Jun 2019 22:24:25 +0000 (22:24 +0000)
committerEric Wong <e@80x24.org>
Sun, 30 Jun 2019 22:24:53 +0000 (22:24 +0000)
20190431 isn't real, NNTP.pm failed to parse it when our
test client sent it.

t/perf-nntpd.t

index 3ca1ce335768454dc4ea2f22f4d99912833474ee..ce3cc409b138e9ff751bea1f0f9955589f65ae70 100644 (file)
@@ -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 {