[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests bug35885.phpt

2007-09-13 Thread Nuno Lopes
nlopess Thu Sep 13 19:58:26 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date/tests bug35885.phpt 
  Log:
  fix test, particularly when running with valgrind, bacause it may take more 
than one second to execute both instructions and thus get different dates
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug35885.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u
Index: php-src/ext/date/tests/bug35885.phpt
diff -u php-src/ext/date/tests/bug35885.phpt:1.1.2.2.2.1 
php-src/ext/date/tests/bug35885.phpt:1.1.2.2.2.2
--- php-src/ext/date/tests/bug35885.phpt:1.1.2.2.2.1Wed Apr 11 22:34:48 2007
+++ php-src/ext/date/tests/bug35885.phptThu Sep 13 19:58:26 2007
@@ -4,8 +4,9 @@
 ?php
 date_default_timezone_set(UTC);
 
-$ts = date(DATE_ISO8601, strtotime('NOW'));
-$ts2 = date(DATE_ISO8601, time());
+$time = time();
+$ts = date(DATE_ISO8601, strtotime('NOW', $time));
+$ts2 = date(DATE_ISO8601, $time);
 
 $res = ($ts == $ts2);
 var_dump($res);

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests bug35885.phpt

2007-04-11 Thread Antony Dovgal
tony2001Wed Apr 11 22:34:48 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date/tests bug35885.phpt 
  Log:
  minor improvement
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug35885.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/ext/date/tests/bug35885.phpt
diff -u php-src/ext/date/tests/bug35885.phpt:1.1.2.2 
php-src/ext/date/tests/bug35885.phpt:1.1.2.2.2.1
--- php-src/ext/date/tests/bug35885.phpt:1.1.2.2Wed Jan  4 21:31:35 2006
+++ php-src/ext/date/tests/bug35885.phptWed Apr 11 22:34:48 2007
@@ -7,7 +7,13 @@
 $ts = date(DATE_ISO8601, strtotime('NOW'));
 $ts2 = date(DATE_ISO8601, time());
 
-var_dump($ts == $ts2);
+$res = ($ts == $ts2);
+var_dump($res);
+
+if (!$res) {
+   var_dump($ts);
+   var_dump($ts2);
+}
 
 ?
 --EXPECT--

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