Merge branch '3.4' into 4.2

* 3.4:
  Change IntlTimeZone to DateTimeZone
This commit is contained in:
Fabien Potencier 2019-06-06 14:59:36 +02:00
commit 9c37d18719
1 changed files with 2 additions and 5 deletions

View File

@ -162,11 +162,8 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
{
$dateFormat = $this->dateFormat;
$timeFormat = $this->timeFormat;
$timezone = $ignoreTimezone ? 'UTC' : $this->outputTimezone;
if (class_exists('IntlTimeZone', false)) {
// see https://bugs.php.net/bug.php?id=66323
$timezone = \IntlTimeZone::createTimeZone($timezone);
}
$timezone = new \DateTimeZone($ignoreTimezone ? 'UTC' : $this->outputTimezone);
$calendar = $this->calendar;
$pattern = $this->pattern;