WordPress.org

Ready to get started?Download WordPress

Forums

[Resolved]RSS Feeds showing the wrong date (1 post)

  1. choffman
    Member
    Posted 6 years ago #

    After upgrading to 2.5, my RSS feeds showed the wrong date (pubdate) for the items. When inspecting the feed xml, the site itself had the right pubdate - it was just the posts.

    So, I found a method of fixing it using some old information that I gathered online.

    Go into your wp-includes directory and edit the feed-rss2.php file.

    I changed the line to now read:

    <pubDate><?php echo mysql2date('r', get_the_time('Y-m-d H:i:s')); ?></pubDate>

    Here's a diff from old to new:


    36c36
    < <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
    ---
    > <pubDate><?php echo mysql2date('r', get_the_time('Y-m-d H:i:s')); ?></pubDate>

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 6 years ago by choffman
  • This topic is not a support question
  • WordPress version: 2.5