From 1a7e773cc4206cad89fac0dbf17c034109295ae5 Mon Sep 17 00:00:00 2001 From: Drew Butler Date: Fri, 16 Mar 2012 17:19:53 -0400 Subject: [PATCH] Changed instances of \DateTimeZone::UTC to 'UTC' as the constant is not valid a produces this error when DateTimeZone is instantiated: DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (1024) --- Extension/Core/ChoiceList/MonthChoiceList.php | 2 +- Extension/Core/Type/DateType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/Core/ChoiceList/MonthChoiceList.php b/Extension/Core/ChoiceList/MonthChoiceList.php index fc2f73a588..0d2e10e840 100644 --- a/Extension/Core/ChoiceList/MonthChoiceList.php +++ b/Extension/Core/ChoiceList/MonthChoiceList.php @@ -39,7 +39,7 @@ protected function load() $pattern = $this->formatter->getPattern(); $timezone = $this->formatter->getTimezoneId(); - $this->formatter->setTimezoneId(\DateTimeZone::UTC); + $this->formatter->setTimezoneId('UTC'); if (preg_match('/M+/', $pattern, $matches)) { $this->formatter->setPattern($matches[0]); diff --git a/Extension/Core/Type/DateType.php b/Extension/Core/Type/DateType.php index 441c2cfdb0..df659ccdad 100644 --- a/Extension/Core/Type/DateType.php +++ b/Extension/Core/Type/DateType.php @@ -57,7 +57,7 @@ public function buildForm(FormBuilder $builder, array $options) \Locale::getDefault(), $format, \IntlDateFormatter::NONE, - \DateTimeZone::UTC, + 'UTC', \IntlDateFormatter::GREGORIAN, $pattern );