From a6025ab5ee0129329a4bc355edaa70743104293d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9B=D0=B8?= Date: Thu, 6 Jun 2019 15:54:42 +0500 Subject: [PATCH] Change IntlTimeZone to DateTimeZone --- .../DateTimeToLocalizedStringTransformer.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php index 36c19970f280c..6ca20106fa399 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php @@ -162,11 +162,8 @@ protected function getIntlDateFormatter($ignoreTimezone = false) { $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;