September 19, 2007
Formatting date & time for RSS
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 sites
Visit my friends
Latest posts
Categories
- art
- audio
- baseball
- bikes
- books
- browsers
- complaints
- crime
- death
- dumb things
- energy
- environment
- family
- friends
- gadgets
- internet
- life
- los angeles
- marriage
- movies
- music
- mysql
- new york
- os x
- pasadena
- photos
- php
- plugins
- podcasting
- politics
- portland
- pugs
- rss
- ruby
- splideo
- subversion
- ubuntu
- video
- watir
- wordpress
- work
No Responses
Please Wait
Leave a Reply