RFC-822 compatible dates in RSS feeds
1 xml.pubDate(p.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z"))
If you're just using strftime someplace else, perhaps in PHP, try:
1 strftime("%a, %d %b %Y %H:%M:%S %z")
DZone Snippets > peter > rss
12875 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Peter Cooperx http://www.petercooper.co.uk/
1 xml.pubDate(p.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z"))
1 strftime("%a, %d %b %Y %H:%M:%S %z")
1 xml.rss('version' => '2.0') do 2 xml.channel do 3 xml.title(page_title) 4 xml.link(@request.protocol + @request.host_with_port + url_for(:rss => nil)) 5 xml.description(page_title) 6 @posts.each { |p| 7 xml.item do 8 xml.title(p.title) 9 xml.link(@request.protocol + @request.host_with_port + url_for(:controller => "posts", :action => "show", :id => p.id)) 10 xml.description(niceify_html_for_rss(p.content)) 11 xml.pubDate(p.updated_at) 12 end 13 } 14 end 15 end
1 https://USERNAME:PASSWORD@gmail.google.com/gmail/feed/atom