derick                                   Tue, 06 Dec 2011 05:59:24 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=320476

Log:
- Fixed test case for #54851.
- Make test case for #32555 the same for all branches.

Bugs: https://bugs.php.net/54851 (Closed) DateTime::createFromFormat, 
$format=='D' or $format=='l' Always Returns Today.
      https://bugs.php.net/32555 (Closed) strtotime("tomorrow") can return false
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/date/tests/bug32555.phpt
    U   php/php-src/branches/PHP_5_3/ext/date/tests/bug54851.phpt
    U   php/php-src/branches/PHP_5_4/ext/date/tests/bug54851.phpt
    U   php/php-src/trunk/ext/date/tests/bug32555.phpt
    U   php/php-src/trunk/ext/date/tests/bug54851.phpt

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug32555.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug32555.phpt   2011-12-06 
05:44:54 UTC (rev 320475)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug32555.phpt   2011-12-06 
05:59:24 UTC (rev 320476)
@@ -8,7 +8,6 @@
 date.timezone=US/Eastern
 --FILE--
 <?php
-
 $stamp = 1112427000;
 print strftime('%c %Z',strtotime('now',$stamp)) ."\n";
 print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n";

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug54851.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug54851.phpt   2011-12-06 
05:44:54 UTC (rev 320475)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug54851.phpt   2011-12-06 
05:59:24 UTC (rev 320476)
@@ -5,7 +5,7 @@
 --FILE--
 <?php
 $date = new DateTime("2011-05-17T22:14:12");
-$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 0 0');
+$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 00 00');
 echo $date->format("r"), "\n";
 echo $date2->format("r"), "\n";
 var_dump($date->format("D") == $date2->format("D"));
@@ -20,7 +20,7 @@
 // Verify that our implementation is the same as for the constructor and
 // strtotime
 $date1 = new DateTime("Tuesday");
-$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 0 0");
+$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 00 00");
 echo $date1->format('r'), "\n";
 echo $date2->format('r'), "\n";
 var_dump($date1->format('D') == $date2->format('D'));

Modified: php/php-src/branches/PHP_5_4/ext/date/tests/bug54851.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/date/tests/bug54851.phpt   2011-12-06 
05:44:54 UTC (rev 320475)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/bug54851.phpt   2011-12-06 
05:59:24 UTC (rev 320476)
@@ -5,7 +5,7 @@
 --FILE--
 <?php
 $date = new DateTime("2011-05-17T22:14:12");
-$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 0 0');
+$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 00 00');
 echo $date->format("r"), "\n";
 echo $date2->format("r"), "\n";
 var_dump($date->format("D") == $date2->format("D"));
@@ -20,7 +20,7 @@
 // Verify that our implementation is the same as for the constructor and
 // strtotime
 $date1 = new DateTime("Tuesday");
-$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 0 0");
+$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 00 00");
 echo $date1->format('r'), "\n";
 echo $date2->format('r'), "\n";
 var_dump($date1->format('D') == $date2->format('D'));

Modified: php/php-src/trunk/ext/date/tests/bug32555.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/bug32555.phpt      2011-12-06 05:44:54 UTC 
(rev 320475)
+++ php/php-src/trunk/ext/date/tests/bug32555.phpt      2011-12-06 05:59:24 UTC 
(rev 320476)
@@ -8,7 +8,6 @@
 date.timezone=US/Eastern
 --FILE--
 <?php
-
 $stamp = 1112427000;
 print strftime('%c %Z',strtotime('now',$stamp)) ."\n";
 print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n";

Modified: php/php-src/trunk/ext/date/tests/bug54851.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/bug54851.phpt      2011-12-06 05:44:54 UTC 
(rev 320475)
+++ php/php-src/trunk/ext/date/tests/bug54851.phpt      2011-12-06 05:59:24 UTC 
(rev 320476)
@@ -5,7 +5,7 @@
 --FILE--
 <?php
 $date = new DateTime("2011-05-17T22:14:12");
-$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 0 0');
+$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 00 00');
 echo $date->format("r"), "\n";
 echo $date2->format("r"), "\n";
 var_dump($date->format("D") == $date2->format("D"));
@@ -20,7 +20,7 @@
 // Verify that our implementation is the same as for the constructor and
 // strtotime
 $date1 = new DateTime("Tuesday");
-$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 0 0");
+$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 00 00");
 echo $date1->format('r'), "\n";
 echo $date2->format('r'), "\n";
 var_dump($date1->format('D') == $date2->format('D'));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to