Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Timezone.php
Go to the documentation of this file.
1 <?php
11 
13 
18 class Timezone extends \Magento\Framework\App\Config\Value
19 {
24  public function beforeSave()
25  {
26  if (!in_array($this->getValue(), \DateTimeZone::listIdentifiers(\DateTimeZone::ALL))) {
27  throw new LocalizedException(__('The time zone is incorrect. Verify the time zone and try again.'));
28  }
29  return $this;
30  }
31 }
__()
Definition: __.php:13