Opened 6 years ago
Closed 6 years ago
#4816 closed defect (bug) (fixed)
Atom feed entry updated field should use get_post_modified_time, not get_post_time
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | General | Version: | 2.2.2 |
| Severity: | normal | Keywords: | Atom feed entry updated has-patch |
| Cc: |
Description
The file wp-includes/feed-atom.php in WordPress 2.2 contains code for generating an Atom feed. (In WordPress 2.0, the code is in the file wp_atom.php.) Here are lines 34 and 35 from feed-atom.php:
<updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated>
<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
Both the updated and published fields use the function get_post_time, so the date output will end up being the same. Line 34 should be replaced with the following:
<updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
I've been using this modification in my own blog for 10 months will no ill effects. Feed readers such as Vienna, which I am a developer for, can correctly parse this updated date information and respond accordingly.
See the Atom API for reference on the updated entry field.

Patch for wp-includes/feed-atom.php