diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-10-22 00:49:35 -0400 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-22 05:28:14 +0000 |
commit | 45f87867107724371d80a563099ab93eda1d919b (patch) | |
tree | 0eeff2e2444dd9fea9fb70b788c5bd02c5124385 /t/psgi_v2.t | |
parent | 4cd7a78f3b8c03670e2d77675229472506eee1eb (diff) | |
download | public-inbox-45f87867107724371d80a563099ab93eda1d919b.tar.gz |
When the gmtime() calls were moved from feed_entry() and atom_header() into feed_updated() in c447bbbd, @_ rather than a scalar was passed to gmtime(). As a result, feed <updated> values end up as "1970-01-01T00:00:00Z". Switch back to using a scalar argument to restore the correct timestamps. Fixes: c447bbbddb4ac8e1 ("wwwatomstream: simplify feed_update callers")
Diffstat (limited to 't/psgi_v2.t')
-rw-r--r-- | t/psgi_v2.t | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t index e0570682..64c1a8d3 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -92,6 +92,11 @@ my $client0 = sub { @bodies = ($res->content =~ /^(hello [^<]+)$/mg); is_deeply(\@bodies, [ "hello world!\n", "hello world\n" ], 'new.html ordering is chronological'); + + $res = $cb->(GET('/v2test/new.atom')); + my @dates = ($res->content =~ m!title><updated>([^<]+)</updated>!g); + is_deeply(\@dates, [ "1993-10-02T00:01:00Z", "1993-10-02T00:00:00Z" ], + 'Date headers made it through'); }; test_psgi(sub { $www->call(@_) }, $client0); my $env = { TMPDIR => $tmpdir, PI_CONFIG => $cfgpath }; |