[wp-trac] [WordPress Trac] #4816: Atom feed entry updated field should use get_post_modified_time, not get_post_time

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 25 18:05:39 GMT 2007


#4816: Atom feed entry updated field should use get_post_modified_time, not
get_post_time
---------------------+------------------------------------------------------
 Reporter:  lapcat   |       Owner:  anonymous              
     Type:  defect   |      Status:  new                    
 Priority:  normal   |   Milestone:                         
Component:  General  |     Version:  2.2.2                  
 Severity:  normal   |    Keywords:  Atom feed entry updated
---------------------+------------------------------------------------------
 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 [http://lapcatsoftware.com/blog/ my
 own blog] for 10 months will no ill effects.  Feed readers such as [http
 ://vienna-rss.sourceforge.net/vienna2.php Vienna], which I am a developer
 for, can correctly parse this updated date information and respond
 accordingly.

 See the
 [http://www.atomenabled.org/developers/syndication/#requiredEntryElements
 Atom API] for reference on the updated entry field.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4816>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list