Skip to content

Commit

Permalink
Changed instances of \DateTimeZone::UTC to 'UTC' as the constant is n…
Browse files Browse the repository at this point in the history
…ot valid a produces this error when DateTimeZone is instantiated: DateTimeZone::__construct() [<a href='datetimezone.--construct'>datetimezone.--construct</a>]: Unknown or bad timezone (1024)
  • Loading branch information
Drew Butler committed Mar 16, 2012
1 parent 91227bf commit 1a7e773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Extension/Core/ChoiceList/MonthChoiceList.php
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion Extension/Core/Type/DateType.php
Expand Up @@ -57,7 +57,7 @@ public function buildForm(FormBuilder $builder, array $options)
\Locale::getDefault(),
$format,
\IntlDateFormatter::NONE,
\DateTimeZone::UTC,
'UTC',
\IntlDateFormatter::GREGORIAN,
$pattern
);
Expand Down

0 comments on commit 1a7e773

Please sign in to comment.