• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/integration/view/base.php
  • Класс: BitrixRestIntegrationViewBase
  • Вызов: Base::internalizeDateTimeValue
protected function internalizeDateTimeValue($value): Result
{
	$r = new Result();

	$date = $this->internalizeDateTime($value);

	if($date instanceof DateTime)
	{
		$value = $date;
	}
	else
	{
		$r->addError(new Error('Wrong type datetime'));
	}

	if($r->isSuccess())
	{
		$r->setData([$value]);
	}

	return $r;
}