bug74274.phpt 626 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Bug #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. print_r($startDate->diff($endDateBuggy));
  9. ?>
  10. --EXPECT--
  11. DateInterval Object
  12. (
  13. [y] => 0
  14. [m] => 0
  15. [d] => 1
  16. [h] => 23
  17. [i] => 0
  18. [s] => 0
  19. [f] => 0
  20. [weekday] => 0
  21. [weekday_behavior] => 0
  22. [first_last_day_of] => 0
  23. [invert] => 0
  24. [days] => 1
  25. [special_type] => 0
  26. [special_amount] => 0
  27. [have_weekday_relative] => 0
  28. [have_special_relative] => 0
  29. )