Fix: Call to deprecated function system_time_zones().

This commit is contained in:
Michael Stenta 2023-10-06 09:13:23 -04:00
parent 1693b5b0d5
commit 1b72dccb80
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace Drupal\farm_settings\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Datetime\TimeZoneFormHelper;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Locale\CountryManagerInterface;
@ -99,7 +100,7 @@ class FarmSettingsFarmInfoForm extends ConfigFormBase {
];
// Get list of timezones.
$timezones = system_time_zones();
$timezones = TimeZoneFormHelper::getOptionsList();
// Dropdown to select default timezone.
$form['default_timezone'] = [