--- a/web/lib/Zend/XmlRpc/Value/DateTime.php Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/XmlRpc/Value/DateTime.php Thu Mar 21 19:50:53 2013 +0100
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_XmlRpc
* @subpackage Value
- * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: DateTime.php 20278 2010-01-14 14:48:59Z ralph $
+ * @version $Id: DateTime.php 24593 2012-01-05 20:35:02Z matthew $
*/
@@ -31,7 +31,7 @@
* @category Zend
* @package Zend_XmlRpc
* @subpackage Value
- * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_XmlRpc_Value_DateTime extends Zend_XmlRpc_Value_Scalar
@@ -48,7 +48,7 @@
*
* @var string
*/
- protected $_isoFormatString = 'YYYYMMddTHH:mm:ss';
+ protected $_isoFormatString = 'yyyyMMddTHH:mm:ss';
/**
* Set the value of a dateTime.iso8601 native type
@@ -69,13 +69,13 @@
} elseif (is_numeric($value)) { // The value is numeric, we make sure it is an integer
$this->_value = date($this->_phpFormatString, (int)$value);
} else {
- $timestamp = strtotime($value);
- if ($timestamp === false || $timestamp == -1) { // cannot convert the value to a timestamp
+ $timestamp = new DateTime($value);
+ if ($timestamp === false) { // cannot convert the value to a timestamp
require_once 'Zend/XmlRpc/Value/Exception.php';
throw new Zend_XmlRpc_Value_Exception('Cannot convert given value \''. $value .'\' to a timestamp');
}
- $this->_value = date($this->_phpFormatString, $timestamp); // Convert the timestamp to iso8601 format
+ $this->_value = $timestamp->format($this->_phpFormatString); // Convert the timestamp to iso8601 format
}
}