• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/control/handler/taskfieldhandler.php
  • Класс: BitrixTasksControlHandlerTaskFieldHandler
  • Вызов: TaskFieldHandler::convertDurationToSeconds
private function convertDurationToSeconds(int $value, string $type): int
{
	if($type === TimeUnitType::HOUR)
	{
		// hours to seconds
		return $value * 3600;
	}
	elseif($type === TimeUnitType::DAY || $type === '')
	{
		// days to seconds
		return $value * 86400;
	}

	return $value;
}