• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/security/sign/timesigner.php
  • Класс: BitrixMainSecuritySignTimeSigner
  • Вызов: TimeSigner::getTimeStamp
protected function getTimeStamp($time)
{
	if (!is_string($time) && !is_int($time))
		throw new ArgumentTypeException('time');

	if (is_string($time) && !is_numeric($time))
	{
		$timestamp = strtotime($time);
		if (!$timestamp)
			throw new ArgumentException(sprintf('Invalid time "%s" format. See "Date and Time Formats"', $time));
	}
	else
	{
		$timestamp = (int) $time;
	}

	if ($timestamp < time())
		throw new ArgumentException(sprintf('Timestamp %d must be greater than now()', $timestamp));

	return $timestamp;
}