1--TEST-- 2MessageFormatter::format(): DateTime accepted to format dates and times 3--INI-- 4date.timezone=Atlantic/Azores 5--SKIPIF-- 6<?php 7if (!extension_loaded('intl')) 8 die('skip intl extension not enabled'); 9--FILE-- 10<?php 11ini_set("intl.error_level", E_WARNING); 12//ini_set("intl.default_locale", "nl"); 13 14$fmt = <<<EOD 15{0,date} {0,time} 16EOD; 17 18$dt = new DateTime("2012-05-06 18:00:42", new DateTimeZone("Europe/Lisbon")); 19 20$mf = new MessageFormatter('en_US', $fmt); 21 22var_dump($mf->format(array($dt))); 23 24?> 25==DONE== 26--EXPECTF-- 27string(%s) "May %d, 2012 %d:%d:42 %s" 28==DONE== 29