During import of your RSS feed from your blog, you should use something like PHP’s date function plus PHP’s strtotime() function to format the date.
Something like:
date(‘Y-m-d’, strtotime($rssTime))
The problem is not WordPress’s RSS feed, it is the script that is parsing and displaying the RSS to your homepage, as the WordPress RSS script builds the feed to the RSS specification. If you were to change this date format, than many RSS readers may reject the feed when your users try to import it.
Sorry, set it up like this:
date(‘F jS, Y’, strtotime($rssTime));
Where $rssTime is the variable that you actually have with the time from the RSS feed in it.
Thanks for the response wprelief!
I’ve been racking my mind over this for many hours now and still can’t quite get it.
It seems as though the code I’m using is simply parsing the data from the RSS XML and echoing it, so it isn’t re-formatting anything. Meaning that depending on how the source RSS has the date published is how the date is published on feed.
For example, my code will parse the WP RSS feed and publish a date in this formate: Tue, 06 July 2010 1:01:01 +0000, but for Twitter, it will pasre the Twitter RSS feed an publish the date like this: July 5th, 2010 1:01. Looking at both the WP and Twitter RSS source codes, it is clear that the feed script I’m using is simply echoing their respective values.
Is there anyway to make the php reinterpret the pubDate in my desired format??
Code is as follows:
[Code moderated as per the Forum Rules. Please use the pastebin]
Using the date code you gave before: http://wordpress.pastebin.com/RsXhKLYV
What I would do is just replace the code where it outputs the date, to format the date the way you want it.