[Vtigercrm-commits] [Vtiger development] #8622: Datetime value conversion is improper

Vtiger development vtiger-tickets at trac.vtiger.com
Tue Sep 8 08:32:13 GMT 2015


#8622: Datetime value conversion is improper
--------------------------+------------------------
 Reporter:  nilay.khatri  |      Owner:  developer
     Type:  defect        |     Status:  new
 Priority:  major         |  Milestone:  Unassigned
Component:  vtigercrm     |    Version:  6.2.0
 Severity:  High          |   Keywords:
--------------------------+------------------------
 We have faced issues when the users are in different timezones.

 While performing search on created time  (e.g. 04-08-2015 [dd-mm-yyyy],
 Canada timezone), where the default timezone is set to UTC, the sql which
 was generated had improper where clause values.

 Something like  2015-08-05 4:00:00 and  2015-08-05 3:49:00.

 Further digging int code found out the function which generates these date
 time values converted to proper format and timezone:

 DateTimeField.php, Line 59:

 public function getDBInsertDateTimeValue($user = null) {
                 return $this->getDBInsertDateValue($user) . ' ' .
                                 $this->getDBInsertTimeValue($user);
         }


 It should be observed that the conversion is happening on date and time
 value separately.

 This is completely naive, timezone conversion cannot happen without having
 time value.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8622>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list