• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/ical/mailinvitation/senderinvitation.php
  • Класс: BitrixCalendarICalMailInvitationSenderInvitation
  • Вызов: SenderInvitation::getDateForTemplate
protected function getDateForTemplate(): string
{
	$res = Helper::getIcalTemplateDate([
		'DATE_FROM' => $this->event['DATE_FROM'],
		'DATE_TO' => $this->event['DATE_TO'],
		'TZ_FROM' => $this->event['TZ_FROM'],
		'TZ_TO' => $this->event['TZ_TO'],
		'FULL_DAY' => $this->event['SKIP_TIME'],
	]);
	$offset = (Helper::getDateObject(null, false, $this->event['TZ_FROM']))->format('P');
	$res .= ' (' . $this->event['TZ_FROM'] . ', ' . 'UTC' . $offset . ')';

	if (isset($this->event['RRULE']['FREQ']) && $this->event['RRULE']['FREQ'] !== 'NONE')
	{
		$rruleString = Helper::getIcalTemplateRRule($this->event['RRULE'],
			[
				'DATE_FROM' => $this->event['DATE_FROM'],
				'DATE_TO' => $this->event['DATE_TO'],
				'TZ_FROM' => $this->event['TZ_FROM'],
				'TZ_TO' => $this->event['TZ_TO'],
				'FULL_DAY' => $this->event['SKIP_TIME'],
			]
		);
		$res .= ', (' . $rruleString . ')';
	}

	return $res;
}