xref: /PHP-8.4/ext/date/tests/bug81273.phpt (revision 84266235)
1--TEST--
2Bug #81273: Date interval calculation not correct
3--FILE--
4<?php
5
6$time = '2000-01-01 00:00:00.000000';
7$tz_aus = new DateTimeZone('Australia/Sydney');
8$tz_us = new DateTimeZone('America/Los_Angeles');
9$auz = new DateTime($time, $tz_aus);
10$us = new DateTime($time, $tz_us);
11
12$diff = $auz->diff($us);
13// Should output int(19)
14var_dump($diff->h);
15?>
16--EXPECT--
17int(19)
18