1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/date/tests/bug80998.phpt
2021-08-31 17:19:28 +01:00

15 lines
337 B
PHP

--TEST--
Bug #80998: Missing second with inverted interval
--FILE--
<?php
$date = new DateTime('2021-04-05 14:00:00');
$interval = new DateInterval('P0DT10799S');
$interval->f = 0.999999;
$interval->invert = 1;
$date->add($interval);
$string = $date->format('Y-m-d H:i:s.u');
echo $string, "\n";
?>
--EXPECT--
2021-04-05 11:00:00.000001