Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
datetimezone.php
1<?php
2
4
6
8{
9 protected $timeZone;
10
15 public static function createByString(string $timezone): DateTimeZone
16 {
17 return new self(Util::prepareTimezone($timezone));
18 }
19
21 {
22 $this->timeZone = $timeZone;
23 }
24
28 public function getFields(): array
29 {
30 return [
31 'timeZone',
32 ];
33 }
34
38 public function toString(): string
39 {
40 return $this->timeZone->getName();
41 }
42
46 public function getTimeZone(): \DateTimeZone
47 {
48 return $this->timeZone;
49 }
50}
__construct(\DateTimeZone $timeZone)
static createByString(string $timezone)
static prepareTimezone(?string $tz=null)
Definition util.php:75