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