mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
fix test, particularly when running with valgrind, bacause it may take more than one second to execute both instructions and thus get different dates
This commit is contained in:
parent
b0e393e543
commit
bb2ec1c790
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user