CallTracker::tryPostpone

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CallTracker
  4. tryPostpone
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/calltracker.php
  • Класс: Bitrix\Crm\Activity\Provider\CallTracker
  • Вызов: CallTracker::tryPostpone
static function tryPostpone($offset, array $fields, array &$updateFields, $checkPermissions = true)
{
	if(!is_numeric($offset))
	{
		$offset = (int)$offset;
	}

	$nowInUserTimezone = time() + \CTimeZone::GetOffset();

	if(isset($fields['END_TIME']))
	{
		$endTimeTs = MakeTimeStamp($fields['END_TIME']);
		if ($endTimeTs <= $nowInUserTimezone)
		{
			$endTimeTs = $nowInUserTimezone;
		}
		$updateFields['END_TIME'] = FormatDate('FULL', $endTimeTs + $offset, $nowInUserTimezone);
	}

	return true;
}

Добавить комментарий