Issues

ZF-11588: Zend_XmlRpc_Value_DateTime throws an exception for string representation of dates outside the range of unix timestamp

Description

Calling:

new Zend_XmlRpc_Value_DateTime('1900-01-01T00:00:00'); new Zend_XmlRpc_Value_DateTime('2040-01-01T00:00:00');

Results in throwing the Zend_XmlRpc_Value_Exception: Cannot convert given value '1900-01-01T00:00:00' to a timestamp

"strtotime" function should not be used at all for checking the date format inside Zend_XmlRpc_Value_DateTime object.

It was reported once in ZF-4249, but got resolved with only a partial fix. You forgot about parsing dateTime values which are retrieved in responses from XMLRPC server in the following format: <dateTime.iso8601>1900-01-01T00:00:00</dateTime.iso8601> (string representation, not a Zend_Date or DateTime objects)

Thank you in advance for fixing this.

Comments

Fixed in trunk and 1.11 release branch. Comparisons in tests were changed to use DateTime as well, to ensure that automatic timezone parsing allows for clean comparison of dates.