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/bug76032.phpt
2021-04-06 20:50:32 +01:00

23 lines
411 B
PHP

--TEST--
Bug #76032 (DateTime->diff having issues with leap days for timezones ahead of UTC)
--FILE--
<?php
date_default_timezone_set('UTC');
$d = new DateTime('2008-03-01');
$a = new DateTime('2018-03-01');
var_dump($d->diff($a)->y);
date_default_timezone_set('Europe/Amsterdam');
$d = new DateTime('2008-03-01');
$a = new DateTime('2018-03-01');
var_dump($d->diff($a)->y);
?>
--EXPECT--
int(10)
int(10)