2010-11-13 16:30:22 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error)
|
2011-05-16 23:43:12 +00:00
|
|
|
--XFAIL--
|
|
|
|
Bug #51819 isn't fixed yet
|
2010-11-13 16:30:22 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2011-05-12 06:51:46 +00:00
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
|
2010-11-13 16:30:22 +00:00
|
|
|
$aTzAbbr = timezone_abbreviations_list();
|
|
|
|
|
|
|
|
$aTz = array();
|
|
|
|
foreach (array_keys($aTzAbbr) as $sKey) {
|
|
|
|
foreach (array_keys($aTzAbbr[$sKey]) as $iIndex) {
|
|
|
|
$sTz = $aTzAbbr[$sKey][$iIndex]['timezone_id'];
|
|
|
|
|
|
|
|
if (! in_array($sTz, $aTz)) {
|
|
|
|
array_push($aTz, $sTz);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($aTz as $sTz) {
|
|
|
|
$sDate = '2010-05-15 00:00:00 ' . $sTz;
|
|
|
|
|
|
|
|
try {
|
|
|
|
$oDateTime = new DateTime($sDate);
|
|
|
|
} catch (Exception $oException) {
|
|
|
|
var_dump($oException->getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var_dump('this should be the only output');
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
string(30) "this should be the only output"
|