xref: /PHP-8.2/ext/date/tests/bug68503.phpt (revision 091c0920)
1--TEST--
2Bug #68503 (date_diff on two dates with timezone set localised returns wrong results)
3--FILE--
4<?php
5date_default_timezone_set('Europe/London');
6echo date_diff(new DateTime("2015-02-01"), new DateTime("2015-05-01"))->format( '%yY %mM %dD' ), "\n";
7date_default_timezone_set('UTC');
8echo date_diff(new DateTime("2015-02-01"), new DateTime("2015-05-01"))->format( '%yY %mM %dD' ), "\n";
9?>
10--EXPECT--
110Y 3M 0D
120Y 3M 0D
13