mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
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).
12 lines
304 B
PHP
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
|