• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/subscribe.php
  • Класс: BitrixCatalogSubscribeTable
  • Вызов: SubscribeTable::checkLastUpdate
static function checkLastUpdate()
{
	$lastUpdate = ProductTable::getList(
		array(
			'select' => array('TIMESTAMP_X'),
			'order' => array('TIMESTAMP_X' => 'DESC'),
			'limit' => 1
		)
	)->fetch();
	if (empty($lastUpdate) || !($lastUpdate['TIMESTAMP_X'] instanceof DateTime))
		return true;

	return (time() - $lastUpdate['TIMESTAMP_X']->getTimestamp() < static::AGENT_TIME_OUT);
}