Page 1 of 1

Bug in RSS last-modified and Etag-header

Posted: Thu Sep 28, 2006 12:31 pm
by JohnnyPark
Hi,
I think I found a bug.
The last-modified and Etag headers of the RSS (and ATOM as well) feeds are not correct when using a server offset.

Example:
I'm currently living in Australia, my Server is located in Germany, time difference is 8 hours, which is the amount I entered in the s9y configuration.
When issuing a new article at, say 18:30 Australian Time, the timestamp of the article in the database says 10:30 - alright. But the RSS-feed has a last-modified (and Etag) header saying 0:30 GMT (equals 2:30 german summer time, which is incorrect by 16 hours). I suppose this is due to the line

[code]
$last_modified = gmdate('D, d M Y H:i:s \G\M\T', serendipity_serverOffsetHour($latest_entry[0]['last_modified'], true));
[/code]

in rss.php (line 57). The serverOffsetHour has to be added, not subtracted, thus the second parameter has to be a 'false' (or omitted) imho.

Somebody please tell me, whether you're getting what I want or not... ;)
Thanks,
JP

Posted: Fri Sep 29, 2006 4:00 am
by judebert
This might be a bug. Thanks for finding it!

I'm afraid Garvin's on vacation, so I'm trying to be extra careful to avoid messing things up while he's gone. I was going to ask you some questions, but a little more digging on my part shows that your suggestion is exactly correct, as far as I can tell. I just committed it to SVN.