xref: /PHP-8.3/ext/date/tests/gh8730.phpt (revision cc9c5772)
1--TEST--
2Bug GH-8730 (DateTime::diff miscalculation is same time zone of different type)
3--FILE--
4<?php
5$foo = new DateTime('2022-06-08 09:15:00', new DateTimeZone('-04:00'));
6$bar = new DateTime('2022-06-08 09:15:00', new DateTimeZone('US/Eastern'));
7print_r($foo->diff($bar));
8?>
9--EXPECT--
10DateInterval Object
11(
12    [y] => 0
13    [m] => 0
14    [d] => 0
15    [h] => 0
16    [i] => 0
17    [s] => 0
18    [f] => 0
19    [invert] => 0
20    [days] => 0
21    [from_string] =>
22)
23