1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/date/tests/bug74524.phpt

27 lines
458 B
PHP

--TEST--
Bug #74524 (Date diff is bad calculated, in same time zone)
--INI--
date.timezone=Europe/Amsterdam
--FILE--
<?php
$a = new DateTime("2017-11-17 22:05:26.000000");
$b = new DateTime("2017-04-03 22:29:15.079459");
$diff = $a->diff($b);
print_r($diff);
?>
--EXPECT--
DateInterval Object
(
[y] => 0
[m] => 7
[d] => 13
[h] => 23
[i] => 36
[s] => 10
[f] => 0.920541
[invert] => 1
[days] => 227
[from_string] =>
)