На что ругается в RSS?

<pubDate>Thu, 9 Jun 2016 0:03:28 GMT</pubDate>
feedvalidator выдаёт следующее:

line 411, column 43: pubDate must be an RFC-822 date-time: Thu, 9 Jun 2016 0:03:28 GMT (57 occurrences) [help]

Thu, 9 Jun 2016 0:03:28 GMT

В help:


element must be an RFC-822 date-time

Invalid date-time. The value specified must meet the Date and Time specifications as defined by RFC822, with the exception that the year should be expressed as four digits.

Change the date-time format to comply with RFC822. Here are examples of valid RFC822 date-times:

Wed, 02 Oct 2002 08:00:00 ESTWed, 02 Oct 2002 13:00:00 GMTWed, 02 Oct 2002 15:00:00 +0200

Common errors include localizing the month name or the days of the week, not using the exact abbreviation provided by the specification, or attempting to use a time zone name that is not listed. See Section 5.1 for the list of allowable values for these portions of the date.

Here is an example of an invalid RFC822 date-time. This is commonly seen in RSS 1.0 feeds generated by older versions of Movable Type:


Not clear? Disagree?

You might be able to find help in one of these fine resources.

Вывожу так
<pubDate><?=date("D, j M Y G:i:s", strtotime($res['DATE_CREATE']))." GMT"?></pubDate>

Мне кажется или валидатор подглючивает?
  • Вопрос задан
  • 142 просмотра
Пригласить эксперта
Ответы на вопрос 1
<pubDate><?= date(\DateTime::RFC822, strtotime($res['DATE_CREATE']))." GMT" ?></pubDate>

<pubDate><?= date(DATE_RFC822, strtotime($res['DATE_CREATE']))." GMT" ?></pubDate>
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы