uawdijnntqw1x1x1
IP : 216.73.216.30
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
tiskom
/
data
/
www
/
tiskom.xhost.intravision.ru
/
bitrix
/
modules
/
main
/
lib
/
ui
/
filter
/
datetime.php
/
/
<? namespace Bitrix\Main\UI\Filter; use Bitrix\Main\Type as MainType; class DateTime { /** @var MainType\Date */ protected $date; /** @var MainType\DateTime */ protected $dateTime; /** @var ?number */ protected $timestamp; /** * DateTime constructor. * @param string $timestamp */ public function __construct($timestamp = "") { $this->timestamp = $timestamp; if (empty($this->timestamp)) { $this->date = new MainType\Date(); $this->timestamp = $this->date->getTimestamp(); } $this->dateTime = MainType\DateTime::createFromTimestamp($this->timestamp); static::adjustTime($this->dateTime); } /** * Adjusts time relative current timezone offset * @param MainType\DateTime $dateTime * @return int timestamp */ public static function adjustTime(MainType\DateTime $dateTime) { if(\CTimeZone::Enabled()) { static $diff = null; if($diff === null) { $diff = \CTimeZone::GetOffset(); } if($diff <> 0) { $dateTime->add(($diff > 0? "-":"")."PT".abs($diff)."S"); } } } /** * Gets month from date * @return string */ public function month() { $date = new MainType\Date($this->toString()); return $date->format("n"); } /** * Gets year * @return string */ public function year() { $date = new MainType\Date($this->toString()); return $date->format("Y"); } /** * Gets quarter number * @return int */ public function quarter() { $date = new MainType\Date($this->toString()); return Quarter::get($date); } /** * Gets quarter start datetime * @return string */ public function quarterStart() { $startDate = Quarter::getStartDate($this->quarter(), $this->year()); $dateTime = MainType\DateTime::createFromTimestamp(MakeTimeStamp($startDate)); static::adjustTime($dateTime); return $dateTime->toString(); } /** * Gets quarter end dateTime * @return string */ public function quarterEnd() { $endDate = Quarter::getEndDate($this->quarter(), $this->year()); $dateTime = MainType\DateTime::createFromUserTime($endDate); $dateTime->add("- 1 second"); return $dateTime->toString(); } /** * Gets datetime string with offset. * @param string $offset * @return string */ public function offset($offset) { $date = MainType\DateTime::createFromTimestamp($this->getTimestamp()); $date->add($offset); static::adjustTime($date); return $date->toString(); } /** * Gets datetime string * @return string */ public function toString() { return $this->dateTime->toString(); } /** * Gets timestamp * @return number */ public function getTimestamp() { return $this->timestamp; } }
/var/www/tiskom/data/www/tiskom.xhost.intravision.ru/bitrix/modules/main/lib/ui/filter/datetime.php