summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4cd7a78)
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")
- '<updated>' . strftime('%Y-%m-%dT%H:%M:%SZ', gmtime(@_)) . '</updated>';
+ my ($t) = @_;
+ '<updated>' . strftime('%Y-%m-%dT%H:%M:%SZ', gmtime($t)) . '</updated>';
@bodies = ($res->content =~ /^(hello [^<]+)$/mg);
is_deeply(\@bodies, [ "hello world!\n", "hello world\n" ],
'new.html ordering is chronological');
@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 };
};
test_psgi(sub { $www->call(@_) }, $client0);
my $env = { TMPDIR => $tmpdir, PI_CONFIG => $cfgpath };