xref: /PHP-8.2/ext/date/tests/bug74524.phpt (revision c8a6a8ab)
1--TEST--
2Bug #74524 (Date diff is bad calculated, in same time zone)
3--INI--
4date.timezone=Europe/Amsterdam
5--FILE--
6<?php
7$a = new DateTime("2017-11-17 22:05:26.000000");
8$b = new DateTime("2017-04-03 22:29:15.079459");
9
10$diff = $a->diff($b);
11print_r($diff);
12?>
13--EXPECT--
14DateInterval Object
15(
16    [y] => 0
17    [m] => 7
18    [d] => 13
19    [h] => 23
20    [i] => 36
21    [s] => 10
22    [f] => 0.920541
23    [invert] => 1
24    [days] => 227
25    [from_string] =>
26)
27