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:
Nuno Lopes 2007-09-13 19:58:26 +00:00
parent b0e393e543
commit bb2ec1c790

View File

@ -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);