summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2007-09-13 19:58:26 +0000
committerNuno Lopes <nlopess@php.net>2007-09-13 19:58:26 +0000
commitbb2ec1c7907d1231da2778bb75e1fa6a44ae73cc (patch)
tree551f327191bad325333b337a05399a40b871f464 /ext/date
parentb0e393e543ecad8c1eb7a5bd89f4717dbf10655c (diff)
downloadphp-git-bb2ec1c7907d1231da2778bb75e1fa6a44ae73cc.tar.gz
fix test, particularly when running with valgrind, bacause it may take more than one second to execute both instructions and thus get different dates
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/tests/bug35885.phpt5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/date/tests/bug35885.phpt b/ext/date/tests/bug35885.phpt
index 60fc2ca695..b3074f7f34 100644
--- a/ext/date/tests/bug35885.phpt
+++ b/ext/date/tests/bug35885.phpt
@@ -4,8 +4,9 @@ Bug #35885 (strtotime("NOW") no longer works)
<?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);