[wp-trac] [WordPress Trac] #39141: RSS feeds have incorrect lastBuildDate when using alternate languages

WordPress Trac noreply at wordpress.org
Wed Dec 7 11:25:22 UTC 2016


#39141: RSS feeds have incorrect lastBuildDate when using alternate languages
--------------------------+-----------------------------
 Reporter:  __jester      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Feeds         |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:  template      |
--------------------------+-----------------------------
 When setting my site in English, the RSS feed says:
 '''<lastBuildDate>Wed, 30 Nov 2016 15:47:34 +0000</lastBuildDate>'''

 But when I set it up in Dutch, it says:
 '''<lastBuildDate>wo, 30 nov 2016 15:47:34 +0000</lastBuildDate>'''

 This date should be a valid RFC date. Otherwise feed validators won't
 validate the feed.

 '''Possible fix:'''
 {{{#!php
 <lastBuildDate><?php
 date = get_lastpostmodified( 'GMT' );
 echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date, false ) : date(
 'D, d M Y H:i:s +0000'
 }}}</lastBuildDate>

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39141>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list