Is there a way in PHP to get a string from a DateTime
object considering the date format according to the locale configuration without having an array of countries => formats
?
$dt = DateTime::createFromFormat(DateTime::ISO8601, '2016-07-27T19:30:00Z');
$ $usadt = /* What PHP function here? */
$ $brazildt = /* What PHP function here? */
echo ("USA Format: " . $usadt);
echo ("Brazil Format: " . $brazildt);
USA Format: 2016/07/27 07:30pm
Brazil Format: 27/07/2016 19:30