ZF-12023: Zend_Feed_Writer_Feed does not accept UNIX timestamps which are not 10 digits
Description
There are 3 methods in Zend_Feed_Writer_Feed_FeedAbstract which try to build a Zend_Date object by timestamp. The problem lies within the recognition of the timestamp value. There is a disputable presumption about the proper length of a timestamp string. Only strings which are 10 characters long (and containing only digits) are considered to be an timestamp. That leads to problems with dates before 2001-09-10 because their timestamps only have the string length of 9 characters.
The methods are:
setDateCreated() setDateModified() setLastBuildDate()
Comments
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-25T19:52:58.000+0000
Confirmed. Example: (http://framework.zend.com/code/blame.php/…)
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-25T20:06:50.000+0000
Tests:
Result is a bunch of these:
Fix:
NOTE: The above fix will fail for REALLY small dates (ie: < 256s after epoch) due to ZF-11610 (which I will fix nowish)
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-25T20:19:08.000+0000
Fixed in trunk r24639 Merged to release-1.11 in r24640 ZF2 PR #840: https://github.com/zendframework/zf2/pull/840