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/gh8730.phpt
2022-07-21 12:32:40 +01:00

23 lines
464 B
PHP

--TEST--
Bug GH-8730 (DateTime::diff miscalculation is same time zone of different type)
--FILE--
<?php
$foo = new DateTime('2022-06-08 09:15:00', new DateTimeZone('-04:00'));
$bar = new DateTime('2022-06-08 09:15:00', new DateTimeZone('US/Eastern'));
print_r($foo->diff($bar));
?>
--EXPECT--
DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 0
[f] => 0
[invert] => 0
[days] => 0
[from_string] =>
)