xref: /PHP-7.1/ext/date/tests/bug66985.phpt (revision e68b5252)
1--TEST--
2Bug #66985 (Some timezones are no longer valid in PHP 5.5.10)
3--FILE--
4<?php
5$zones = array(
6	"CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "Factory", "GB-Eire",
7	"GMT0", "Greenwich", "Hongkong", "Iceland", "Iran", "Israel", "Jamaica",
8	"Japan", "Kwajalein", "Libya", "MST7MDT", "Navajo", "NZ-CHAT", "Poland",
9	"Portugal", "PST8PDT", "Singapore", "Turkey", "Universal", "W-SU",
10
11	"UTC", "GMT", "GMT+0100", "-0230",
12);
13
14foreach ( $zones as $zone )
15{
16	$d = new DateTimeZone( $zone );
17	print_r($d);
18}
19?>
20--EXPECT--
21DateTimeZone Object
22(
23    [timezone_type] => 3
24    [timezone] => CST6CDT
25)
26DateTimeZone Object
27(
28    [timezone_type] => 3
29    [timezone] => Cuba
30)
31DateTimeZone Object
32(
33    [timezone_type] => 3
34    [timezone] => Egypt
35)
36DateTimeZone Object
37(
38    [timezone_type] => 3
39    [timezone] => Eire
40)
41DateTimeZone Object
42(
43    [timezone_type] => 3
44    [timezone] => EST5EDT
45)
46DateTimeZone Object
47(
48    [timezone_type] => 3
49    [timezone] => Factory
50)
51DateTimeZone Object
52(
53    [timezone_type] => 3
54    [timezone] => GB-Eire
55)
56DateTimeZone Object
57(
58    [timezone_type] => 3
59    [timezone] => GMT0
60)
61DateTimeZone Object
62(
63    [timezone_type] => 3
64    [timezone] => Greenwich
65)
66DateTimeZone Object
67(
68    [timezone_type] => 3
69    [timezone] => Hongkong
70)
71DateTimeZone Object
72(
73    [timezone_type] => 3
74    [timezone] => Iceland
75)
76DateTimeZone Object
77(
78    [timezone_type] => 3
79    [timezone] => Iran
80)
81DateTimeZone Object
82(
83    [timezone_type] => 3
84    [timezone] => Israel
85)
86DateTimeZone Object
87(
88    [timezone_type] => 3
89    [timezone] => Jamaica
90)
91DateTimeZone Object
92(
93    [timezone_type] => 3
94    [timezone] => Japan
95)
96DateTimeZone Object
97(
98    [timezone_type] => 3
99    [timezone] => Kwajalein
100)
101DateTimeZone Object
102(
103    [timezone_type] => 3
104    [timezone] => Libya
105)
106DateTimeZone Object
107(
108    [timezone_type] => 3
109    [timezone] => MST7MDT
110)
111DateTimeZone Object
112(
113    [timezone_type] => 3
114    [timezone] => Navajo
115)
116DateTimeZone Object
117(
118    [timezone_type] => 3
119    [timezone] => NZ-CHAT
120)
121DateTimeZone Object
122(
123    [timezone_type] => 3
124    [timezone] => Poland
125)
126DateTimeZone Object
127(
128    [timezone_type] => 3
129    [timezone] => Portugal
130)
131DateTimeZone Object
132(
133    [timezone_type] => 3
134    [timezone] => PST8PDT
135)
136DateTimeZone Object
137(
138    [timezone_type] => 3
139    [timezone] => Singapore
140)
141DateTimeZone Object
142(
143    [timezone_type] => 3
144    [timezone] => Turkey
145)
146DateTimeZone Object
147(
148    [timezone_type] => 3
149    [timezone] => Universal
150)
151DateTimeZone Object
152(
153    [timezone_type] => 3
154    [timezone] => W-SU
155)
156DateTimeZone Object
157(
158    [timezone_type] => 3
159    [timezone] => UTC
160)
161DateTimeZone Object
162(
163    [timezone_type] => 2
164    [timezone] => GMT
165)
166DateTimeZone Object
167(
168    [timezone_type] => 1
169    [timezone] => +01:00
170)
171DateTimeZone Object
172(
173    [timezone_type] => 1
174    [timezone] => -02:30
175)
176