• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/site_checker.php
  • Класс: CSiteCheckerTest
  • Вызов: CSiteCheckerTest::check_mysql_time
function check_mysql_time()
{
	global $DB;

	$s = time();
	while($s == time());
	$s++;
	$res = $DB->Query('SELECT NOW() AS A');
	$f = $res->Fetch();
	if (($diff = abs($s - strtotime($f['A']))) <= 1)
		return true;
	return $this->Result(false, GetMessage('SC_TIME_DIFF', array('#VAL#' => $diff)));
}