Opened 18 years ago
Closed 18 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: | |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.2.2 |
Component: | General | Keywords: | Atom feed entry updated has-patch |
Focuses: | 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.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Patch for wp-includes/feed-atom.php