Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
$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 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);