Atom1Feed should write atom:published element
|Reported by:||ttencate@…||Owned by:||Deacalion|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Atom1Feed currently produces XML like this:
<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 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.
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:
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.
Change History (12)
comment:1 Changed 6 years ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
Changed 5 years ago by matt@…
comment:10 Changed 3 years ago by Deacalion
- Owner changed from nobody to Deacalion
- Status changed from new to assigned