Skip to content
Snippets Groups Projects
Commit 7ec2ab57 authored by catch's avatar catch
Browse files

Issue #2446859 by frob, jcnventura, mducharme, ge, mikeburrelljr: Installer...

Issue #2446859 by frob, jcnventura, mducharme, ge, mikeburrelljr: Installer warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings
parent 1776b019
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -205,7 +205,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -205,7 +205,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['regional_settings']['date_default_timezone'] = array( $form['regional_settings']['date_default_timezone'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => $this->t('Default time zone'), '#title' => $this->t('Default time zone'),
'#default_value' => date_default_timezone_get(), // Use system timezone if set, but avoid throwing a warning in PHP >=5.4
'#default_value' => @date_default_timezone_get(),
'#options' => system_time_zones(), '#options' => system_time_zones(),
'#description' => $this->t('By default, dates in this site will be displayed in the chosen time zone.'), '#description' => $this->t('By default, dates in this site will be displayed in the chosen time zone.'),
'#weight' => 5, '#weight' => 5,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment