From f7449c8782912c669dd7e490f8a397385e8bf9d4 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Thu, 28 Mar 2013 12:05:28 -0400
Subject: [PATCH] Use GMT to compare due dates.

---
 include/class.ticket.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 53614c5a5..cf46c7f17 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());
-- 
GitLab