--TEST-- IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject() --SKIPIF-- = 0) die('skip for ICU < 51.2'); ?> --FILE-- format($ts), "\n"; var_dump($df->getCalendar(), $df->getCalendarObject()->getType(), $df->getCalendarObject()->getTimeZone()->getId()); echo "\n"; } $df = new IntlDateFormatter('fr@calendar=islamic', 0, 0, 'Europe/Minsk'); d($df); //changing the calendar with a cal type should not change tz $df->setCalendar(IntlDateFormatter::TRADITIONAL); d($df); //but changing with an actual calendar should $cal = IntlCalendar::createInstance("UTC"); $df->setCalendar($cal); d($df); ?> ==DONE== --EXPECT-- dimanche 1 janvier 2012 ap. J.-C. 03:00:00 UTC+03:00 int(1) string(9) "gregorian" string(12) "Europe/Minsk" dimanche 8 Safar 1433 AH 03:00:00 UTC+03:00 int(0) string(7) "islamic" string(12) "Europe/Minsk" dimanche 1 janvier 2012 ap. J.-C. 00:00:00 UTC bool(false) string(9) "gregorian" string(3) "UTC" ==DONE==