Change IntlTimeZone to DateTimeZone
This commit is contained in:
parent
2ae0580eea
commit
a6025ab5ee
@ -162,11 +162,8 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
|
|||||||
{
|
{
|
||||||
$dateFormat = $this->dateFormat;
|
$dateFormat = $this->dateFormat;
|
||||||
$timeFormat = $this->timeFormat;
|
$timeFormat = $this->timeFormat;
|
||||||
$timezone = $ignoreTimezone ? 'UTC' : $this->outputTimezone;
|
$timezone = new \DateTimeZone($ignoreTimezone ? 'UTC' : $this->outputTimezone);
|
||||||
if (class_exists('IntlTimeZone', false)) {
|
|
||||||
// see https://bugs.php.net/bug.php?id=66323
|
|
||||||
$timezone = \IntlTimeZone::createTimeZone($timezone);
|
|
||||||
}
|
|
||||||
$calendar = $this->calendar;
|
$calendar = $this->calendar;
|
||||||
$pattern = $this->pattern;
|
$pattern = $this->pattern;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user