1--TEST--
2Test timezone_transitions_get() function : basic functionality
3--FILE--
4<?php
5echo "*** Testing timezone_transitions_get() : basic functionality ***\n";
6
7//Set the default time zone
8date_default_timezone_set("Europe/London");
9
10// Create a DateTimeZone object
11$tz = timezone_open("Europe/London");
12
13$tran = timezone_transitions_get($tz);
14
15echo "\n-- Get all 60s transitions --\n";
16$tran = timezone_transitions_get($tz, -306972000, -37241999);
17var_dump( gettype($tran) );
18
19echo "\n-- Total number of transitions: " . count($tran). " --\n";
20
21echo "\n-- Format a sample entry pfor Spring 1963 --\n";
22var_dump( $tran[6] );
23
24?>
25--EXPECT--
26*** Testing timezone_transitions_get() : basic functionality ***
27
28-- Get all 60s transitions --
29string(5) "array"
30
31-- Total number of transitions: 18 --
32
33-- Format a sample entry pfor Spring 1963 --
34array(5) {
35  ["ts"]=>
36  int(-213228000)
37  ["time"]=>
38  string(24) "1963-03-31T02:00:00+0000"
39  ["offset"]=>
40  int(3600)
41  ["isdst"]=>
42  bool(true)
43  ["abbr"]=>
44  string(3) "BST"
45}
46