Appearance
Pausing SLAs
Pausing generates periods of time we don't want to count towards our SLA Timer.
Pausing works retroactively to the status
or duration
method and is required to be defined before we calculate the full SLA.
// Given the time now is 14:00:00 29-07-2022
$sla = SLA::fromSchedule(
SLASchedule::create()->from('09:00:00')->to('17:30:00')
);
$sla->addPause('03:00:00 27-07-2022', '13:59:59 27-07-2022');
$sla->duration('05:35:40 25-07-2022')->totalHours; // 34
Note:
If you want to specify a full day of pausing, you might want to setup Holidays instead.