|
Hmm, I'm pretty sure we USED to validate .... did the validators change?
Donsheng, when you need a little break from repositories, can you fix these dates? Look for the rss_add_items() function in lib/rsslib.php ... this line explicitly sets the date that way: $result .= rss_full_tag('pubDate',3,false,date('D, d M Y H:i:s T',$item->pubdate)); DS, you probably just want to make it show GMT all the time there.
Actually I'll just fix it, since I'm there
I've made it GMT all the time now, working fine for me.
HI MArtin,
Thanks - I'll grab a copy of the relevant script from the public CVS - how long does it take for your changes to get across to there? Sean K You can see the change here on this bug: http://tracker.moodle.org/browse/MDL-12563?page=com.atlassian.jira.plugin.system.issuetabpanels:cvs-tabpanel
And it'll be in tomorrow's weekly builds. And it's probably in CVS mirrors by now too. Note, to regenerate all the RSS feeds, delete all the files from dataroot/rss/* and the re-run cron.php manually.
Hi,
Client has just reported that now their feeds are broken: http://www.jbevirtualtraining.co.uk/dev3d/rss/file.php/4/2/data/1/rss.xml shows the following: JBE Virtual Training http://www.jbevirtualtraining.co.uk/dev3d Also, neither of their sites (live or dev) have an rss directory under dataroot. Sean K Then I would suspect no one has run cron yet ...
HI Martin,
Cron is set to run every 15 minutes on both of their sites. It is definitely running Any ideas? Sean K Try running it manually via web (turn off the cron security first so you can) and see if you see errors.
I'm pretty sure it's not related to the change I made. Ok, just done so - no errors reported in the cron output (see below).
Server Time: Thu, 18 Sep 2008 13:37:31 +0100 Starting activity modules And now, when I check that feed, it looks OK to me - no errors. Why would running it manually be different to running it scheduled? cheers Sean K code change reviewed, this could not cause any regressions
thanks The other way around it, if you wanted to retain local times, would be to use the timezone offset. So
$result .= rss_full_tag('pubDate',3,false,date('D, d M Y H:i:s T',$item->pubdate)); becomes $result .= rss_full_tag('pubDate',3,false,date('D, d M Y H:i:s O',$item->pubdate)); The "O" in date() will give you +0000 for GMT, -0500 for EST, etc. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
We have a client here in the UK using RSS feeds, and they have also noticed that the RSS Feed pubdate is in incorrect format - if you try and validate the feed using (for example) the W3C rss feed validator, it complains:
line 20, column 44: pubDate must be an RFC-822 date-time: Tue, 16 Sep 2008 09:23:22 BST
The help attached to it states:
Message
element must be an RFC-822 date-time
Explanation
Invalid date-time. The value specified must meet the Date and Time specifications as defined by RFC822, with the exception that the year should be expressed as four digits.
Solution
Change the date-time format to comply with RFC822. Here are examples of valid RFC822 date-times:
<pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>
<pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate>
<pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>
Common errors include localizing the month name or the days of the week, not using the exact abbreviation provided by the specification, or attempting to use a time zone name that is not listed. See Section 5.1 for the list of allowable values for these portions of the date.
Here is an example of an invalid RFC822 date-time. This is commonly seen in RSS 1.0 feeds generated by older versions of Movable Type:
<pubDate>2002-10-02T08:00:00-05:00</pubDate>
So presumably it does not like the BST?
This is fairly urgent.
Sean K