• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/ical/basic/datetimepropertytype.php
  • Класс: BitrixCalendarICalBasicDatetimePropertyType
  • Вызов: DatetimePropertyType::__construct
public function __construct(
	$names,
	Date $dateTime,
	bool $withTime = false,
	bool $withTimezone = false,
	bool $isUTC = false
)
{
	parent::__construct($names);

	$this->dateTime = $dateTime;
	$this->withTimezone = $withTimezone;
	$this->withTime = $withTime;
	$this->isUTC = $isUTC;

	if ($this->withTimezone && $this->dateTime instanceof DateTime)
	{
		$timezone = $this->dateTime->getTimezone()->getName();
		$this->addParameter(new Parameter('TZID', $timezone));
	}
	elseif (!$this->withTime)
	{
		$this->addParameter(new Parameter('VALUE', 'DATE'));
	}
}