Make WordPress Core

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: lapcat's profile lapcat 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)

feed-atom-patch.txt (821 bytes) - added by lapcat 18 years ago.
Patch for wp-includes/feed-atom.php

Download all attachments as: .zip

Change History (4)

@lapcat
18 years ago

Patch for wp-includes/feed-atom.php

#1 @lapcat
18 years ago

  • Keywords has-patch added

#2 @foolswisdom
18 years ago

  • Milestone set to 2.3

#3 @westi
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6093]) Make the atom feed updated field actually tell you when the post was updated. Fixes #4816 props lapcat.

Note: See TracTickets for help on using tickets.