Forums

pubDate in wp-rss2.php (9 posts)

  1. bronski
    Member
    Posted 5 years ago #

    The way pubDate in wp-rss2.php is created is
    echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'));
    First of all, "+000" isn't always correct, depending on where you live. but worse: for some reason the string created gets localized! So 'May' becomes 'Mai' and 'Thu' becomes 'Don' (in German). Now the feed doesn't validate... :-(
    I think it would be correct to use 'r' instead of 'D, d M Y H:i:s +0000' (like it is used in wp-commentsrss2.php).

  2. romulus
    Member
    Posted 5 years ago #

    to solve the problem that dates are translated I had to insert a
    <?php define ('WPLANG', 'en_US'); ?>
    at the beginning of wp-rss2.php and another define at the end to change WPLANG back to normal.

  3. bronski
    Member
    Posted 5 years ago #

    beat me, that didn't work. it stays German.

  4. carthik
    Member
    Posted 5 years ago #

    Looks like the feeds should not be localized then, or at least localized properly in the source.

  5. bronski
    Member
    Posted 5 years ago #

    I think not. what is in a feed? title, excerpt, maybe the full text, but usually none of the things that get localized like buttons, number of trackbacks, comments, etc.
    pubDate is supposed to be RFC-822 compliant, and that seems to imply english dateformat. at least feed-validators complain about localized pubDates.

  6. michelv
    Member
    Posted 5 years ago #

    Fixed, committed.
    Actually we already have a "don't use translated months/weekdays" option for mysql2date, it just wasn't used in the feeds and wp-blog-header.

  7. christoph
    Member
    Posted 5 years ago #

    The pubDate in wp-rss2.php (perhaps in the other feeds as well) still doesn't work correctly for me (final 1.2 mingus release). Instead of the +0000 it should indicate the local time difference from gmt if i'm not mistaken. I've set the time difference correctly in my options and it shows correctly in my weblog, but not in the feed.

  8. michelv
    Member
    Posted 5 years ago #

    In the feed, it shows GMT times. This is why it shows +0000.

  9. TheTester
    Member
    Posted 4 years ago #

    Its still broken on wordpress 1.5!! using date('r',..) will give the right rfc-822 format (in english) regardless of the translations used... You should use that..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.