• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/Calc/Libs/DateLib.php
  • Класс: BitrixBizprocCalcLibsDateLib
  • Вызов: DateLib::callToUserDate
public function callToUserDate(Arguments $args)
{
	$user = $args->getFirst();
	$date = $args->getSecondSingle();

	if (!$user)
	{
		return null;
	}

	if (!$date)
	{
		$date = time();
	}
	elseif (($date = $this->makeTimestamp($date)) === false)
	{
		return null;
	}

	$userId = CBPHelper::extractFirstUser($user, $args->getParser()->getActivity()->getDocumentId());
	$offset = $userId ? CTimeZone::GetOffset($userId, true) : 0;

	return new BizprocBaseTypeValueDateTime($date, $offset);
}