This project is read-only.
4
Vote

Feed publication dates incorrectly deserialized based on timezone

description

We are in timezone GMT +0200.
If the feed has the pubdate in GMT +0200 there are now problems and the time is correct.
If the feed has the pubdate in GMT the time we get from argotic(item.PublicationDate) is 2 hours in the past.
If the feed has the pubdate in CEST we get the error datetime.
 
In the documetnation: AtomEntry.PublishedOn Property
The DateTime should be provided in Coordinated Universal Time (UTC).
 
 
When testing:
 
GMT
1345 http://www.nieuwsblad.be/rss.aspx?section=nieuws&subsection=binnenland
  <pubDate>Wed, 06 Aug 2008 07:38:17 GMT</pubDate>   =>  #8/6/2008 7:38:17 AM#  =>  must be #8/6/2008 9:38:17 AM#
 
+0200
1285 http://www.arena51.be/nl/rss/nl/news.xml
  <pubdate>Tue, 05 Aug 2008 22:47:13 +0200</pubdate>  =>  #12:00:00 AM# => error datetime
2246 http://www.zita.be/xml/lifestyle.xml
  <pubDate>Wed, 06 Aug 2008 00:02:49 +0200</pubDate>  =>  #8/6/2008 12:02:49 AM#  => correct
 
CEST
2007 http://www.knack.be/feeds/72-nieuws-sport-article-rss2.0.xml
      <pubDate>Wed, 06 Aug 2008 08:00:00 CEST</pubDate>  => #12:00:00 AM# => error datetime

comments

kellberg wrote Sep 2, 2008 at 10:03 PM

I have the same problem with dates like this "Tue, 2 Sep 2008 12:19:00 GMT" turns into "01-01-0001 00:00:00"

wrote Sep 2, 2008 at 10:03 PM

wrote Jan 27, 2011 at 9:49 PM

syntaxsolutions wrote Jan 27, 2011 at 9:50 PM

Yes I get the same problem as kellberg for Google News .. I'll have to find a work around for this until its fixed... please fix...

wrote Aug 3, 2012 at 5:18 PM

jontsao wrote Aug 3, 2012 at 5:18 PM

The offending code is somewhere in the Rfc822 code. I'm not sure why Argotic is doing pre-parsing/formatting of datetimes itself, rather than just relying on DateTime's built-in vanilla TryParse. What I did to work around this issue is just to replace the TryParseRfc822DateTime method with a simple DateTime.TryParse, and that fixed things for me. It'd be nice if this could be fixed, but it looks like the project has been abandoned.

wrote Feb 14, 2013 at 8:26 PM

wrote Nov 27 at 8:34 PM