<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Django vs feedparser on dates</title>
	<atom:link href="http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 10 May 2010 07:36:49 +1000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rafael</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-11159</link>
		<dc:creator>Rafael</dc:creator>
		<pubDate>Wed, 10 Dec 2008 21:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-11159</guid>
		<description>Hi! I&#039;ve got the same problem with 1-hour-delay, you just have to use your timezone:
&lt;code&gt;
import datetime, time

datetime.datetime(2004, 11, 19, 5, 13, 31) + datetime.timedelta(seconds=time.timezone)
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi! I&#8217;ve got the same problem with 1-hour-delay, you just have to use your timezone:<br />
<code><br />
import datetime, time</p>
<p>datetime.datetime(2004, 11, 19, 5, 13, 31) + datetime.timedelta(seconds=time.timezone)<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fazal Majid</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2261</link>
		<dc:creator>Fazal Majid</dc:creator>
		<pubDate>Sun, 16 Sep 2007 12:14:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2261</guid>
		<description>Keep in mind the DST bug could well be in the feed generator. Quite a few will blithely assume UTC = Local Time +/- offset and not factor in DST.

I have often seen feeds with timestamps 1 hour into the future, and added logic to my aggregator, Temboz, to automatically substract 1 hour if it detects this:

http://www.temboz.com/temboz/fileview?f=temboz/normalize.py</description>
		<content:encoded><![CDATA[<p>Keep in mind the DST bug could well be in the feed generator. Quite a few will blithely assume UTC = Local Time +/- offset and not factor in DST.</p>
<p>I have often seen feeds with timestamps 1 hour into the future, and added logic to my aggregator, Temboz, to automatically substract 1 hour if it detects this:</p>
<p><a href="http://www.temboz.com/temboz/fileview?f=temboz/normalize.py" rel="nofollow">http://www.temboz.com/temboz/fileview?f=temboz/normalize.py</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Hellmann</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2148</link>
		<dc:creator>Doug Hellmann</dc:creator>
		<pubDate>Mon, 03 Sep 2007 09:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2148</guid>
		<description>If you&#039;re building an aggregator, you might want to have a look at &lt;a href=&quot;http://www.doughellmann.com/projects/feedcache/&quot; rel=&quot;nofollow&quot;&gt;feedcache&lt;/a&gt;.  When combined with &lt;a href=&quot;http://pypi.python.org/pypi/shove&quot; rel=&quot;nofollow&quot;&gt;shove&lt;/a&gt;,  it makes managing feeds for aggregators very easy.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re building an aggregator, you might want to have a look at <a href="http://www.doughellmann.com/projects/feedcache/" rel="nofollow">feedcache</a>.  When combined with <a href="http://pypi.python.org/pypi/shove" rel="nofollow">shove</a>,  it makes managing feeds for aggregators very easy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: garth</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2140</link>
		<dc:creator>garth</dc:creator>
		<pubDate>Sun, 02 Sep 2007 23:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2140</guid>
		<description>&lt;code&gt;
Testing translation methods against 195 timestamps...
               _ludo: 0
              _devex: 0
              _kiopi: 0
             _anders: 0
                 _gt: 0
        _sam_and_zeb: 0
              _garth: 4
&lt;/code&gt;

All the methods work, except the one I got from the &lt;a href=&quot;http://code.djangoproject.com/browser/djangoproject.com/django_website/apps/aggregator/bin/update_feeds.py&quot; rel=&quot;nofollow&quot;&gt;Django community blog&lt;/a&gt;. Oops. 

Now I&#039;ll have to collect raw timestamps so I can check dateutil versus feedburner...</description>
		<content:encoded><![CDATA[<p><code><br />
Testing translation methods against 195 timestamps...<br />
               _ludo: 0<br />
              _devex: 0<br />
              _kiopi: 0<br />
             _anders: 0<br />
                 _gt: 0<br />
        _sam_and_zeb: 0<br />
              _garth: 4<br />
</code></p>
<p>All the methods work, except the one I got from the <a href="http://code.djangoproject.com/browser/djangoproject.com/django_website/apps/aggregator/bin/update_feeds.py" rel="nofollow">Django community blog</a>. Oops. </p>
<p>Now I&#8217;ll have to collect raw timestamps so I can check dateutil versus feedburner&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikeal</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2136</link>
		<dc:creator>mikeal</dc:creator>
		<pubDate>Sun, 02 Sep 2007 21:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2136</guid>
		<description>I think i ended up scratching the use of the feedparser _parsed attributes all together. The parsing code there just isn&#039;t as robust and dateutil.parser.parse(). 

For what it&#039;s worth I&#039;ve never had problems with dateutil&#039;s parsing code, especially for ISO8601 parsing which is usually what feeds use.</description>
		<content:encoded><![CDATA[<p>I think i ended up scratching the use of the feedparser _parsed attributes all together. The parsing code there just isn&#8217;t as robust and dateutil.parser.parse(). </p>
<p>For what it&#8217;s worth I&#8217;ve never had problems with dateutil&#8217;s parsing code, especially for ISO8601 parsing which is usually what feeds use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Ruby</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2133</link>
		<dc:creator>Sam Ruby</dc:creator>
		<pubDate>Sun, 02 Sep 2007 15:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2133</guid>
		<description>&lt;a href=&quot;http://intertwingly.net/blog/2007/09/02/Dealing-With-Dates&quot; rel=&quot;nofollow&quot;&gt;datetime.datetime.utcfromtimestamp(calendar.timegm(feedparser_timestamp))&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><a href="http://intertwingly.net/blog/2007/09/02/Dealing-With-Dates" rel="nofollow">datetime.datetime.utcfromtimestamp(calendar.timegm(feedparser_timestamp))</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Ruby</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2132</link>
		<dc:creator>Sam Ruby</dc:creator>
		<pubDate>Sun, 02 Sep 2007 15:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2132</guid>
		<description>&lt;strong&gt;Dealing With Dates...&lt;/strong&gt;

                                                               Simon Willison: Django vs feedparser on dates. Some useful tips in the comments. I find Python&#8217;s timezone stuff endlessly frustrating: I know it can do what I want, but it always take...</description>
		<content:encoded><![CDATA[<p><strong>Dealing With Dates&#8230;</strong></p>
<p>                                                               Simon Willison: Django vs feedparser on dates. Some useful tips in the comments. I find Python&#8217;s timezone stuff endlessly frustrating: I know it can do what I want, but it always take&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zebziggle</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2131</link>
		<dc:creator>Zebziggle</dc:creator>
		<pubDate>Sun, 02 Sep 2007 13:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2131</guid>
		<description>Try again with formatting ...

&lt;code&gt;
if hasattr(content, &#039;modified&#039;) and \
   content.modified != None:
   feed.lastModified = \
     datetime.datetime.utcfromtimestamp(
     calendar.timegm(content.modified))
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Try again with formatting &#8230;</p>
<p><code><br />
if hasattr(content, 'modified') and \<br />
   content.modified != None:<br />
   feed.lastModified = \<br />
     datetime.datetime.utcfromtimestamp(<br />
     calendar.timegm(content.modified))<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zebziggle</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2130</link>
		<dc:creator>Zebziggle</dc:creator>
		<pubDate>Sun, 02 Sep 2007 13:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2130</guid>
		<description>Mine looks like this:

&lt;code&gt;
    if hasattr(content, &#039;modified&#039;) and content.modified != None:
        feed.lastModified = datetime.datetime.utcfromtimestamp(calendar.timegm(content.modified))

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Mine looks like this:</p>
<p><code><br />
    if hasattr(content, 'modified') and content.modified != None:<br />
        feed.lastModified = datetime.datetime.utcfromtimestamp(calendar.timegm(content.modified))</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ludo</title>
		<link>http://www.deadlybloodyserious.com/2007/09/feedparser-v-django/comment-page-1/#comment-2128</link>
		<dc:creator>ludo</dc:creator>
		<pubDate>Sun, 02 Sep 2007 10:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.deadlybloodyserious.com/2007/09/django-vs-feedparser-on-dates/#comment-2128</guid>
		<description>garth, utc should be pytz.UTC</description>
		<content:encoded><![CDATA[<p>garth, utc should be pytz.UTC</p>
]]></content:encoded>
	</item>
</channel>
</rss>
