Category archive: rss
September 19, 2007
Formatting date & time for RSS 0
find more posts in: php, rssAccording to the RSS spec, all of the dates in your RSS content should be in RFC 822 format. That means they should look like this:
Sat, 07 Sep 2002 09:42:31 GMT
Here’s a PHP function that will take a timestamp and give you that string:
function rss_time($time){ return strftime("%a, %d %b %Y %H:%M:%S %z", $time); }
My name is Joey Nelson. I'm a web developer living in Portland, OR. I'm married to an awesome lady and we have two weird little pugs. I do a weekly comedy podcast and make dumb songs with this guy Ben. I don't post to this blog very often, and very few people actually read it. If you'd like to find out more about my fascinating life, check this stuff out:
Stuff
Visit my friends
Latest posts
Categories