• 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).

Viewing 8 replies - 1 through 8 (of 8 total)
  • 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.

    Thread Starter bronski

    (@bronski)

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

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

    Thread Starter bronski

    (@bronski)

    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.

    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.

    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.

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

    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..

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘pubDate in wp-rss2.php’ is closed to new replies.