• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_crm_helper.php
  • Класс: CVoxImplantCrmHelper
  • Вызов: CVoxImplantCrmHelper::getCallEndTime
static function getCallEndTime( array $statisticRecord)
{
	$startTime = $statisticRecord['CALL_START_DATE'];
	if(!$startTime instanceof BitrixMainTypeDateTime)
		return null;

	$endTime = clone $startTime;

	$duration = (int)$statisticRecord['CALL_DURATION'];
	if($duration === 0)
		return $statisticRecord['CALL_START_DATE'];

	$endTime->add($duration . ' seconds');
	return $endTime;
}