Page 1 of 1

Timestamp in RSS feed

Posted: Mon Aug 30, 2010 10:34 am
by abdussamad
I noticed that the time in the RSS feed on my site was off. Basically the contents of <pubdate></pubdate> is given as the entry timestamp after application of server offset but with the pre-offset timezone. The result is an incorrect time in the RSS feed. The bug can be fixed by modifying this line in functions_rss.inc.php:

Code: Select all

$entry['feed_timestamp_r']   = date('r', serendipity_serverOffsetHour($entry['timestamp']));
With this:

Code: Select all

$entry['feed_timestamp_r']   = date('r', $entry['timestamp']);

Re: Timestamp in RSS feed

Posted: Mon Aug 30, 2010 11:01 am
by garvinhicking
Hi!

Thanks for the info! I fixed it as per your suggestion!

Regards,
Garvin

Re: Timestamp in RSS feed

Posted: Mon Sep 13, 2010 5:47 pm
by abdussamad
There is another timestamp up top in the RSS feed. I believe its supposed to indicate the last modification date of the RSS feed. Its <pubdate> tag right under the <generator> tag. The bug fix is in plugin_internal.inc.php in the includes dir. This is the line that has to be changed:

Code: Select all

$bag_content = gmdate('D, d M Y H:i:s \G\M\T', serendipity_serverOffsetHour($entries[0]['last_modified']));
With this:

Code: Select all

$bag_content = gmdate('D, d M Y H:i:s \G\M\T', $entries[0]['last_modified']);