bug66985.phpt 2.8 KB

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