xref: /php-src/ext/date/tests/bug74274.phpt (revision c8a6a8ab)
1--TEST--
2Bug #74274 (Handling DST transitions correctly)
3--FILE--
4<?php
5$tz = new DateTimeZone("Europe/Paris");
6$startDate = new \DateTime('2018-10-28 00:00:00', $tz);
7$endDateBuggy = new \DateTime('2018-10-29 23:00:00', $tz);
8
9print_r($startDate->diff($endDateBuggy));
10?>
11--EXPECT--
12DateInterval Object
13(
14    [y] => 0
15    [m] => 0
16    [d] => 1
17    [h] => 23
18    [i] => 0
19    [s] => 0
20    [f] => 0
21    [invert] => 0
22    [days] => 1
23    [from_string] =>
24)
25