1--TEST-- 2IntlCalendar::setTimeZone(): valid time zones for DateTime but not ICU 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10ini_set("intl.default_locale", "nl"); 11date_default_timezone_set('Europe/Amsterdam'); 12 13$intlcal = new IntlGregorianCalendar(); 14 15$pstdate = new DateTime('2012-01-01 00:00:00 WEST'); 16$intlcal->setTimeZone($pstdate->getTimeZone()); 17var_dump($intlcal->getTimeZone()->getID()); 18 19$pstdate = new DateTime('2012-01-01 00:00:00 +24:00'); 20$intlcal->setTimeZone($pstdate->getTimeZone()); 21var_dump($intlcal->getTimeZone()->getID()); 22 23--EXPECTF-- 24 25Warning: IntlCalendar::setTimeZone(): intlcal_set_time_zone: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d 26string(16) "Europe/Amsterdam" 27 28Warning: IntlCalendar::setTimeZone(): intlcal_set_time_zone: object has an time zone offset that's too large in %s on line %d 29string(16) "Europe/Amsterdam" 30