• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/task.php
  • Класс: CTasks
  • Вызов: CTasks::convertDurationFromSeconds
static function convertDurationFromSeconds($value, $type)
{
	if ((string)$type === TimeUnitType::HOUR)
	{
		// hours to seconds
		return round(intval($value) / 3600, 0);
	}
	elseif ((string)$type === TimeUnitType::DAY || (string)$type == ''/*days by default, see install/db*/)
	{
		// days to seconds
		return round(intval($value) / 86400, 0);
	}

	return $value;
}