bug80963.phpt 878 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --TEST--
  2. Bug #80963: DateTimeZone::getTransitions() truncated
  3. --INI--
  4. date.timezone=UTC
  5. --FILE--
  6. <?php
  7. $tzids = [ 'Europe/London', 'America/New_York', 'Europe/Berlin' ];
  8. foreach ($tzids as $tzid)
  9. {
  10. $tz = new DateTimeZone($tzid);
  11. $t = $tz->getTransitions();
  12. var_dump(sizeof($t), end($t));
  13. }
  14. ?>
  15. --EXPECT--
  16. int(243)
  17. array(5) {
  18. ["ts"]=>
  19. int(2140045200)
  20. ["time"]=>
  21. string(24) "2037-10-25T01:00:00+0000"
  22. ["offset"]=>
  23. int(0)
  24. ["isdst"]=>
  25. bool(false)
  26. ["abbr"]=>
  27. string(3) "GMT"
  28. }
  29. int(237)
  30. array(5) {
  31. ["ts"]=>
  32. int(2140668000)
  33. ["time"]=>
  34. string(24) "2037-11-01T06:00:00+0000"
  35. ["offset"]=>
  36. int(-18000)
  37. ["isdst"]=>
  38. bool(false)
  39. ["abbr"]=>
  40. string(3) "EST"
  41. }
  42. int(144)
  43. array(5) {
  44. ["ts"]=>
  45. int(2140045200)
  46. ["time"]=>
  47. string(24) "2037-10-25T01:00:00+0000"
  48. ["offset"]=>
  49. int(3600)
  50. ["isdst"]=>
  51. bool(false)
  52. ["abbr"]=>
  53. string(3) "CET"
  54. }