﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14656	Atom1Feed should write atom:published element	ttencate@…	Matt Deacalion Stevens	"`Atom1Feed` currently produces XML like this:

{{{
#!xml
<entry>
  <title>..</title>
  <link href=""..."" rel=""alternate""></link>
  <updated>2010-10-18T00:00:00+02:00</updated>
  <author><name>...</name></author>
  <id>...</id>
  <summary type=""html"">...</summary>
</entry>
}}}

The thing to note here is that the date goes in the `atom:updated` element, not the `atom:published` element.

The [http://tools.ietf.org/html/rfc4287#page-23 RFC] clearly suggests to me that this is not the intended usage:

{{{
   The ""atom:updated"" element is a Date construct indicating the most
   recent instant in time when an entry or feed was modified in a way
   the publisher considers significant.  Therefore, not all
   modifications necessarily result in a changed atom:updated value.
}}}

Whereas:

{{{
   The ""atom:published"" element is a Date construct indicating an
   instant in time associated with an event early in the life cycle of
   the entry.
}}}

This is more than just a theoretical problem. Google Reader, for example, does not seem to use the updated element, and uses the date that it first saw the item appear. As a result, it does not order the items properly upon first import of the feed.

The code in Django responsible for this:

`django/utils/feedgenerator.py:331`

{{{
#!python
if item['pubdate'] is not None:
    handler.addQuickElement(u""updated"", rfc3339_date(item['pubdate']).decode('utf-8'))
}}}

There appears to be no mention of the `published` element.

I suggest also writing the `published` element, because this is the intended usage of that element. The `updated` element is mandatory, so it should still be written as well.

However, maybe this needs review by someone who knows more about Atom and the peculiarities of various feed readers."	Bug	closed	contrib.syndication	dev	Normal	fixed		Matt Deacalion Stevens	Accepted	1	0	0	0	0	0
