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/bug81263.phpt
2022-12-01 11:08:38 +00:00

39 lines
658 B
PHP

--TEST--
Bug #81263 (Wrong result from DateTimeImmutable::diff)
--FILE--
<?php
$dt1 = new DateTimeImmutable('2020-07-19 18:30:00', new DateTimeZone('Europe/Berlin'));
$dt2 = new DateTimeImmutable('2020-07-19 16:30:00', new DateTimeZone('UTC'));
print_r($dt2->diff($dt1));
print_r($dt1->diff($dt2));
?>
--EXPECTF--
DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 0
[f] => 0
[invert] => 0
[days] => 0
[from_string] =>
)
DateInterval Object
(
[y] => 0
[m] => 0
[d] => 0
[h] => 0
[i] => 0
[s] => 0
[f] => 0
[invert] => 0
[days] => 0
[from_string] =>
)