mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +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).
18 lines
376 B
PHP
18 lines
376 B
PHP
--TEST--
|
|
Bug #81273: Date interval calculation not correct
|
|
--FILE--
|
|
<?php
|
|
|
|
$time = '2000-01-01 00:00:00.000000';
|
|
$tz_aus = new DateTimeZone('Australia/Sydney');
|
|
$tz_us = new DateTimeZone('America/Los_Angeles');
|
|
$auz = new DateTime($time, $tz_aus);
|
|
$us = new DateTime($time, $tz_us);
|
|
|
|
$diff = $auz->diff($us);
|
|
// Should output int(19)
|
|
var_dump($diff->h);
|
|
?>
|
|
--EXPECT--
|
|
int(19)
|