Index: tests/Zend/Date/DateObjectTest.php
===================================================================
--- tests/Zend/Date/DateObjectTest.php (revision 24030)
+++ tests/Zend/Date/DateObjectTest.php (working copy)
@@ -539,6 +539,21 @@
$this->assertTrue(($diff < 2), "Zend_Date_DateObject->_getTime() returned a significantly "
. "different timestamp than expected: $diff seconds");
}
+
+ /**
+ * Test for RFC 2822's Obsolete Date and Time (paragraph 4.3)
+ */
+ public function test_obsRfc2822()
+ {
+ $date = new Zend_Date();
+ /* Obsolete timezones */
+ $this->assertTrue($date->set("Mon, 15 Aug 2005 15:52:01 +0000", Zend_Date::RFC_2822) instanceof Zend_Date);
+ $this->assertTrue($date->set("Mon, 15 Aug 2005 15:52:01 UT", Zend_Date::RFC_2822) instanceof Zend_Date);
+ $this->assertTrue($date->set("Mon, 15 Aug 2005 15:52:01 GMT", Zend_Date::RFC_2822) instanceof Zend_Date);
+ $this->assertTrue($date->set("Mon, 15 Aug 2005 15:52:01 EST", Zend_Date::RFC_2822) instanceof Zend_Date);
+ $this->assertTrue($date->set("Mon, 15 Aug 2005 15:52:01 I", Zend_Date::RFC_2822) instanceof Zend_Date);
+ $this->assertTrue($date->set("Mon, 15 Aug 2005 15:52:01 Z", Zend_Date::RFC_2822) instanceof Zend_Date);
+ }
}

class Zend_Date_DateObjectTestHelper extends Zend_Date
Index: library/Zend/Date.php
===================================================================
--- library/Zend/Date.php (revision 24030)
+++ library/Zend/Date.php (working copy)
@@ -2107,7 +2107,7 @@
break;

case self::RFC_2822:
- $result = preg_match('/^\w{3},\s(\d{1,2})\s(\w{3})\s(\d{4})\s(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]{1}\d{4})$/', $date, $match);
+ $result = preg_match('/^\w{3},\s(\d{1,2})\s(\w{3})\s(\d{4})\s(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]{1}\d{4}|\w{1,20})$/', $date, $match);
if (!$result) {
require_once 'Zend/Date/Exception.php';
throw new Zend_Date_Exception("no RFC 2822 format ($date)", 0, null, $date);