diff --git a/include/class.ticket.php b/include/class.ticket.php
index 53614c5a5828e2e95e60c9bed1d9655927c6cdeb..cf46c7f17ea4fe3d59a450b0b8c51dbda36ee1fd 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -1102,11 +1102,11 @@ class Ticket {
         $sql='UPDATE '.TICKET_TABLE.' SET isoverdue=0, updated=NOW() ';
 
         //clear due date if it's in the past
-        if($this->getDueDate() && strtotime($this->getDueDate())<=time())
+        if($this->getDueDate() && Misc::db2gmtime($this->getDueDate()) <= Misc::gmtime())
             $sql.=', duedate=NULL';
 
         //Clear SLA if est. due date is in the past
-        if($this->getSLADueDate() && strtotime($this->getSLADueDate())<=time())
+        if($this->getSLADueDate() && Misc::db2gmtime($this->getSLADueDate()) <= Misc::gmtime())
             $sql.=', sla_id=0 ';
 
         $sql.=' WHERE ticket_id='.db_input($this->getId());