Zend Framework

Zend_Feed_Rss pubDate should be localtime rather than gmdate('r')

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.0
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Feed
  • Labels:
    None

Description

zend/feed/rss.php line 425 and other places makes pubDate like the following.
$pubdate = $this->_element->createElement('pubDate', gmdate('r', $pubdate));
This always generates timzone +0000 like "<pubDate>Tue, 12 May 2009 02:01:07 +0000</pubDate>".

I think the feed should generate in local timezone.

Something like
$pubdate = new Zend_Date($pubdate);
$pubdate = $this->_element->createElement('pubDate', $pubdate->get(Zend_Date::RSS));
would generate in local time zone. (though this adds dependency to Zend_Date)

I do not know about the atom class, but the same issue may exist.

Activity

Hide
twk added a comment -

atom uses date(DATE_ATOM) and it shows in the local timezone.
so you may just use date(DATE_RSS) for rss?

Show
twk added a comment - atom uses date(DATE_ATOM) and it shows in the local timezone. so you may just use date(DATE_RSS) for rss?
Hide
Pádraic Brady added a comment -

Fixed in r18265

Show
Pádraic Brady added a comment - Fixed in r18265

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: