1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/date/tests/bug80974.phpt
Derick Rethans 8426623521 Upgrade timelib to 2021.06
Fixes among others:
. Bug #79580 (date_create_from_format misses leap year).
. Bug #80974 (Wrong diff between 2 dates in different timezones).
. Bug #81097 (DateTimeZone silently falls back to UTC when providing an offset with seconds).
. Bug #81273 (Date interval calculation not correct).
2021-08-08 13:41:33 +01:00

12 lines
304 B
PHP

--TEST--
Bug #80974: Wrong diff between 2 dates in different timezones
--FILE--
<?php
$dtToronto = new DateTime('2012-01-01 00:00:00.000000 America/Toronto');
$dtVancouver = new DateTime('2012-01-01 00:00:00.000000 America/Vancouver');
echo $dtVancouver->diff($dtToronto)->format('%h');
?>
--EXPECT--
3