- Forums
- PHP
- Xml Feeds Error Pubdate Must Be An Rfc-822 Date-time:
This Page Contains information about Xml Feeds Error Pubdate Must Be An Rfc-822 Date-time: By Wallpaperama in category PHP with 0 Replies. [1215], Last Updated: Sat May 18, 2024
Wallpaperama
Sat Nov 29, 2008
0 Comments
1195 Visits
ok, today i was trying to make my wallpaper site with rss feeds. so when i went to http://feedvalidator.org to check if my site was correct, i kept getting an error:
Sorry
This feed does not validate.
line 18, column 40: pubDate must be an RFC-822 date-time: Sat, 29 Nov 2008 23:10:13-0800 (30 occurrences) [help]
Sat, 29 Nov 2008 23:10:13-0800the thing is im trying to display the date with a php file. but i kept using the date funtion in php, this is what i was using:
echo '.date("D").', '.date("d").' '.date("M").' '.date("Y").' '.date("H").':'.date("i").':'.date("s").'-0800';
well, it wasn't working. after researching a bit, i found the answer. so to show the correc RFC-822 date format, i was doing it the wrong way, the correct way to do it is to use the date() function but with DATE_RFC2822 constant, instead of how i was using my date, this is how i would show the date in the xml file:
date(DATE_RFC2822)
hope this helps