Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorTimezoneSetting.php
| <?php | <?php | ||||
| final class PhabricatorTimezoneSetting | final class PhabricatorTimezoneSetting | ||||
| extends PhabricatorOptionGroupSetting { | extends PhabricatorOptionGroupSetting { | ||||
| const SETTINGKEY = 'timezone'; | const SETTINGKEY = 'timezone'; | ||||
| public function getSettingName() { | public function getSettingName() { | ||||
| return pht('Timezone'); | return pht('Timezone'); | ||||
| } | } | ||||
| public function getSettingPanelKey() { | |||||
| return PhabricatorDateTimeSettingsPanel::PANELKEY; | |||||
| } | |||||
| protected function getSettingOrder() { | |||||
| return 100; | |||||
| } | |||||
| protected function getControlInstructions() { | |||||
| return pht('Select your local timezone.'); | |||||
| } | |||||
| public function getSettingDefaultValue() { | public function getSettingDefaultValue() { | ||||
| return date_default_timezone_get(); | return date_default_timezone_get(); | ||||
| } | } | ||||
| public function assertValidValue($value) { | public function assertValidValue($value) { | ||||
| // NOTE: This isn't doing anything fancy, it's just a much faster | // NOTE: This isn't doing anything fancy, it's just a much faster | ||||
| // validator than doing all the timezone calculations to build the full | // validator than doing all the timezone calculations to build the full | ||||
| // list of options. | // list of options. | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||