#445 [NEW]: Date does not handle DATE_FORMAT_ISO_EXTENDED correctly

From: Date: Wed, 17 Dec 2003 12:16:11 +0000
Subject: #445 [NEW]: Date does not handle DATE_FORMAT_ISO_EXTENDED correctly
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24501@lists.php.net to get a copy of this message
From: mike dot carter at personalmedicaladvisor dot co dot uk Operating system: Redhat 9 PHP version: 4.3.4 PHP Bug Type: Bug System Bug description: Date does not handle DATE_FORMAT_ISO_EXTENDED correctly Description: ------------ Passing in what looks like a valid DATE_FORMAT_ISO_EXTENDED format string causes the Date clas to fail to parse it and manipulate its values. The values returned from getXXX() methods are based on the default values set on line 172 // unknown format $this->year = 0; $this->month = 1; $this->day = 1; $this->hour = 0; $this->minute = 0; $this->second = 0; Reproduce code: --------------- $d="2003-12-17T10:27:03Z"; $dateObj = new Date(); $dateObj->setDate($d, DATE_FORMAT_ISO_EXTENDED); echo $dateObj->getMonth(); Expected result: ---------------- 12 Actual result: -------------- 1 -- Edit bug report at http://pear.php.net/bugs/bug.php?id=445&edit=1 --

« previous php.pear.dev (#24501) next »