cgm225 Posted July 8, 2007 Share Posted July 8, 2007 I am outputting RSS feed with a PHP script, but some of the dates/times are causing the feed to fail w3 validation (see: here). What is causing the problem? Thank you in advance! Link to comment https://forums.phpfreaks.com/topic/58909-solved-php-output-of-rss-feed-not-validating/ Share on other sites More sharing options...
AndyB Posted July 8, 2007 Share Posted July 8, 2007 http://validator.w3.org/feed/docs/error/InvalidRFC2822Date.html I'd say you want to change the date format your php script generates so it matches the spec, i.e three-day month names Link to comment https://forums.phpfreaks.com/topic/58909-solved-php-output-of-rss-feed-not-validating/#findComment-292358 Share on other sites More sharing options...
cgm225 Posted July 8, 2007 Author Share Posted July 8, 2007 Currently I am generating the date with:: $pubdate = date("D, d F Y H:i:s") . " GMT"; How can I make it so the output includes months abbreviated down to three letters (i.e. June would be Jun, July would be Jul, etc.)? Thank you in advance! Link to comment https://forums.phpfreaks.com/topic/58909-solved-php-output-of-rss-feed-not-validating/#findComment-292360 Share on other sites More sharing options...
AndyB Posted July 8, 2007 Share Posted July 8, 2007 date("M") generates the three character abbreviation. Just change F to M in your script line http://ca.php.net/manual/en/function.date.php Link to comment https://forums.phpfreaks.com/topic/58909-solved-php-output-of-rss-feed-not-validating/#findComment-292361 Share on other sites More sharing options...
cgm225 Posted July 8, 2007 Author Share Posted July 8, 2007 Perfect Thank you! Link to comment https://forums.phpfreaks.com/topic/58909-solved-php-output-of-rss-feed-not-validating/#findComment-292363 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.