...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/processor/task/scheduler/result/impact.php
- Класс: BitrixTasksProcessorTaskSchedulerResultcould
- Вызов: could::correctWorkTime
public function correctWorkTime(DateTime $startDate, Datetime $endDate, $duration) { if (!$this->getMatchWorkTime()) { return; // do nothing, dates are okay already } else { $calendar = Calendar::getInstance(); if(!$calendar->isWorkTime($startDate)) { $this->setStartDatePlanUserTimeGmt($calendar->getClosestWorkTime($startDate, true)->toStringGmt()); $this->setEndDatePlanUserTimeGmt($calendar->calculateEndDate($startDate, $duration)->toStringGmt()); } else { $this->setEndDatePlanUserTimeGmt($calendar->calculateEndDate($startDate, $duration)->toStringGmt()); } } }