Fixed RSS written 10 years ago

Rss Feed

I recently noticed my RSS feed wasn’t quite working proper, and was always showing up new feeds. This it turned out was due to dodgy dates being produced by the following function:


    $entry['pubDate'] = date(DATE_RFC2822, strtotime($post['datetime']));

The constant DATE_RFC2822 isn’t available in PHP4. This was fixed with the following code:


    $entry['pubDate'] = date("r", strtotime($post['datetime']));

With “r” being the character for RFC 2822 formatted date, e.g. Thu, 21 Dec 2000 16:01:07 +0200.

Yes it’s raining and I’m bored.

← previous entry | next entry → Sat 18th Aug 2007 - 14:13 | no comments | tagged with Sennir News

 There are no responses to this entry

Do you want to say something? Use the form below to add your thoughts.

Note if you submit your comments, they'll appear here! yes, right below this. Try and make them relevant eh?

Leave a reply

Name: displayed next to your comment
Email: will not be displayed
URL: to link back to your site
Comments: Markdown syntax allowed

Notes on leaving replies: