# RSS::Parser.parse pubdate changing back

**URL:** <https://www.ruby-forum.com/t/rss-parser-parse-pubdate-changing-back/154722>\
**Category:** Ruby\
**Created:** [December 3, 2008, 9:18am UTC](https://www.ruby-forum.com/t/rss-parser-parse-pubdate-changing-back/154722 "2008-12-03T09:18:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewdon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@andrewdon](https://www.ruby-forum.com/u/andrewdon)\
**Post date:** [December 3, 2008, 9:18am UTC](https://www.ruby-forum.com/t/rss-parser-parse-pubdate-changing-back/154722/1 "2008-12-03T09:18:17Z")

</div>

I have a script that goes into my site and parses the rss feeds, but  
when it does this the pub date jumps backup about 11 months.

The code is below,

require ‘rss/2.0’  
require ‘open-uri’  
class NewsController \< ApplicationController

def index  
begin  
if !$app\_lang || $app\_lang == ‘en’  
feed\_url = ‘[Rediff News](http://www.rediff.com/rss/usrss.xml)’  
else  
feed\_url =  
'[http://localhost:8080/WebSummary/newssummary.jsp?cmbLanguage='+$app\_lang](http://localhost:8080/WebSummary/newssummary.jsp?cmbLanguage='+$app_lang)  
end  
open(feed\_url) do |http|  
response = http.read  
@result = RSS::Parser.parse(response, false)  
logger.info @result.channel.pubDate  
end  
rescue StandardError =\> myStandardError  
logger.info(myStandardError)  
end  
end  
end

Kind Regards,  
Andrew

---

<div class="post-metadata">

**Author:** ![andrewdon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@andrewdon](https://www.ruby-forum.com/u/andrewdon)\
**Post date:** [December 3, 2008, 3:10pm UTC](https://www.ruby-forum.com/t/rss-parser-parse-pubdate-changing-back/154722/2 "2008-12-03T15:10:57Z")

</div>

Check your feed and see if you have a “pubDate” (literal) and that the  
format is something like “Sat, 07 Sep 2002 00:00:01 GMT”
