mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02: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
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue