xref: /PHP-8.4/ext/date/tests/bug76032.phpt (revision 091c0920)
1--TEST--
2Bug #76032 (DateTime->diff having issues with leap days for timezones ahead of UTC)
3--FILE--
4<?php
5
6date_default_timezone_set('UTC');
7
8$d = new DateTime('2008-03-01');
9$a = new DateTime('2018-03-01');
10
11var_dump($d->diff($a)->y);
12
13date_default_timezone_set('Europe/Amsterdam');
14
15$d = new DateTime('2008-03-01');
16$a = new DateTime('2018-03-01');
17
18var_dump($d->diff($a)->y);
19?>
20--EXPECT--
21int(10)
22int(10)
23