diff options
| author | Nuno Lopes <nlopess@php.net> | 2007-09-13 19:58:26 +0000 |
|---|---|---|
| committer | Nuno Lopes <nlopess@php.net> | 2007-09-13 19:58:26 +0000 |
| commit | bb2ec1c7907d1231da2778bb75e1fa6a44ae73cc (patch) | |
| tree | 551f327191bad325333b337a05399a40b871f464 | |
| parent | b0e393e543ecad8c1eb7a5bd89f4717dbf10655c (diff) | |
| download | php-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
| -rw-r--r-- | ext/date/tests/bug35885.phpt | 5 |
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); |
