Forum: Ruby RSS::Parser.parse pubdate changing back

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Andrew D. (Guest)
on 2008-12-03 10:18
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 = 'http://www.rediff.com/rss/usrss.xml'
            else
              feed_url =
'http://localhost:8080/WebSummary/newssummary.jsp?c...
            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
melampus (Guest)
on 2008-12-03 16:10
(Received via mailing list)
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"
This topic is locked and can not be replied to.