Skip to content

Commit a6025ab

Browse files
committed
Change IntlTimeZone to DateTimeZone
1 parent 2ae0580 commit a6025ab

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,8 @@ protected function getIntlDateFormatter($ignoreTimezone = false)
162162
{
163163
$dateFormat = $this->dateFormat;
164164
$timeFormat = $this->timeFormat;
165-
$timezone = $ignoreTimezone ? 'UTC' : $this->outputTimezone;
166-
if (class_exists('IntlTimeZone', false)) {
167-
// see https://bugs.php.net/bug.php?id=66323
168-
$timezone = \IntlTimeZone::createTimeZone($timezone);
169-
}
165+
$timezone = new \DateTimeZone($ignoreTimezone ? 'UTC' : $this->outputTimezone);
166+
170167
$calendar = $this->calendar;
171168
$pattern = $this->pattern;
172169

0 commit comments

Comments
 (0)