When using format_date to with the 'r' format it fails to generate a date that is compliant with the RFC as it translates the date. According to the spec, it should always be in english.

This is particularly troublesome when trying to use modules like 'views_rss' to generate an rss feed from a non-english language site. The 'pubDate' in the feed will not be rendered in english and the feed will be invalid.

The attached patch forces the formatted string to be in english when the 'r' format is specifically requested.

CommentFileSizeAuthor
date_format_rfc2822.patch918 bytesjmiccolis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.