php-src/ext/date/tests/format-negative-timestamp.phpt
Derick Rethans bf23d8d2b8 - Renamed date_timezone_set/get() to date_default_timezone_set/get().
- Added missing proto's and folding marks.
2005-07-04 21:27:26 +00:00

25 lines
345 B
PHP

--TEST--
strtotime() - Format: @timestamps
--FILE--
<?php
date_default_timezone_set("GMT");
$i = 5;
$max = getrandmax();
$max_2 = $max / 2;
while($i--) {
$new_tm = rand(1, $max);
if ($new_tm > $max_2)
$new_tm *= -1;
if (strtotime("@$new_tm") != $new_tm) {
echo "Error when parsing: @$new_tm\n";
}
}
echo "done!";
?>
--EXPECT--
done!