Perhaps just a caveat, but `class.ticket.php:1105` where the SLA is cleared (if due date is in the past) does not use the same date arithmetic as you are here. Is there a possible edge case where `$this->clearOverdue()` would clear the SLA?