Fixed RSS written 2 years ago
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.
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
Notes on leaving replies:
Anything you type here will be visible to the world! type wisely.
Want to make your comment look pretty? Use markdown syntax for advanced formatting and link options.
Got Gravatar? Stick your email address in!
By using this, you agree to the Privacy Policy.
Site navigation