<?xml version="1.0"?>
<?xml-stylesheet 
 href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/9700/bug">
    <title>PEAR Bug #9700</title>
    <link>http://pear.php.net/bugs/9700</link>
    <description>[Closed] Incorrect timestamps allowd</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bugs/9700"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/9700/2008-03-23+19%3A05%3A56#2008-03-23+19%3A05%3A56"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/9700/2007-11-05+20%3A09%3A06#2007-11-05+20%3A09%3A06"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/9700/2006-12-26+20%3A31%3A51#2006-12-26+20%3A31%3A51"/>
     </rdf:Seq>
    </items>
  </channel>
    <item rdf:about="http://pear.php.net/bugs/9700">
      <title>seb.anselment@... [2006-12-26 16:30:37]</title>
      <link>http://pear.php.net/bugs/9700</link>
      <description><![CDATA[<pre>Date Feature/Change Request
Reported by seb.anselment@...
2006-12-26T21:30:37-00:00
PHP: 4.3.10 OS: Debian Package Version: 1.4.7

Description:
------------
Hi,

I really love this package but I found a very strange behavior when passing a not existing timestamp like f.ex. 20060132T163315 (month is 32) to the Date constructor. Surely this makes no sense but it's so easy to set a correct date (like mktime does).
You can see the test script beyond these lines. I found nothing in one of the 88 reports matching this topic. 

Now decide yourselves if this is a bug report or feature request ;)

I wish you all a merry Christmas and a happy new year! Continue your great work.

Yours,
Seb

Test script:
---------------
$timestamp = &quot;20060132T163315&quot;;
$d = new Date($timestamp);
echo $d-&gt;getDate(DATE_FORMAT_ISO_BASIC);

//I solved this by using:
$timestamp = &quot;20060132T163315&quot;;
$d = new Date($timestamp);
$d-&gt;addSpan(new Date_Span(&quot;0,0,0,0&quot;));
echo $d-&gt;getDate(DATE_FORMAT_ISO_BASIC);

Expected result:
----------------
2006-02-01 16:33:15

Actual result:
--------------
2006-01-32 16:33:15</pre>]]></description>
      <content:encoded><![CDATA[<pre>Date Feature/Change Request
Reported by seb.anselment@...
2006-12-26T21:30:37-00:00
PHP: 4.3.10 OS: Debian Package Version: 1.4.7

Description:
------------
Hi,

I really love this package but I found a very strange behavior when passing a not existing timestamp like f.ex. 20060132T163315 (month is 32) to the Date constructor. Surely this makes no sense but it's so easy to set a correct date (like mktime does).
You can see the test script beyond these lines. I found nothing in one of the 88 reports matching this topic. 

Now decide yourselves if this is a bug report or feature request ;)

I wish you all a merry Christmas and a happy new year! Continue your great work.

Yours,
Seb

Test script:
---------------
$timestamp = &quot;20060132T163315&quot;;
$d = new Date($timestamp);
echo $d-&gt;getDate(DATE_FORMAT_ISO_BASIC);

//I solved this by using:
$timestamp = &quot;20060132T163315&quot;;
$d = new Date($timestamp);
$d-&gt;addSpan(new Date_Span(&quot;0,0,0,0&quot;));
echo $d-&gt;getDate(DATE_FORMAT_ISO_BASIC);

Expected result:
----------------
2006-02-01 16:33:15

Actual result:
--------------
2006-01-32 16:33:15</pre>]]></content:encoded>
      <dc:date>2006-12-26T21:30:37-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/9700/2008-03-23+19%3A05%3A56#2008-03-23+19%3A05%3A56">
      <title>c01234 [2008-03-24 00:05]</title>
      <link>http://pear.php.net/bugs/9700#1206317156</link>
      <description><![CDATA[<pre>Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/Date</pre>]]></description>
      <content:encoded><![CDATA[<pre>Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/Date</pre>]]></content:encoded>
      <dc:date>2008-03-24T00:05:56-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/9700/2007-11-05+20%3A09%3A06#2007-11-05+20%3A09%3A06">
      <title>c01234 [2007-11-06 01:09]</title>
      <link>http://pear.php.net/bugs/9700#1194311346</link>
      <description><![CDATA[<pre>This has been changed in CVS</pre>]]></description>
      <content:encoded><![CDATA[<pre>This has been changed in CVS</pre>]]></content:encoded>
      <dc:date>2007-11-06T01:09:06-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/9700/2006-12-26+20%3A31%3A51#2006-12-26+20%3A31%3A51">
      <title>firman [2006-12-27 01:31]</title>
      <link>http://pear.php.net/bugs/9700#1167183111</link>
      <description><![CDATA[<pre>Yep, you are right. Since setDate() allowed any timestamp, not only date, but also time too. Currently, we are working at 1.5.x branch, Date would be more strict/smart also faster. Hope will finish it soon.

You too, have a great holiday. Thanks :)</pre>]]></description>
      <content:encoded><![CDATA[<pre>Yep, you are right. Since setDate() allowed any timestamp, not only date, but also time too. Currently, we are working at 1.5.x branch, Date would be more strict/smart also faster. Hope will finish it soon.

You too, have a great holiday. Thanks :)</pre>]]></content:encoded>
      <dc:date>2006-12-27T01:31:51-00:00</dc:date>
    </item>
</rdf:RDF>