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