Timestamp in RSS feed

Found a bug? Tell us!!
Post Reply
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Timestamp in RSS feed

Post 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']);
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Timestamp in RSS feed

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Re: Timestamp in RSS feed

Post 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']);
Post Reply