CRM-13413 - fix to address datetime to timestamp conversion
authorDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Mon, 23 Sep 2013 09:27:07 +0000 (02:27 -0700)
committerDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Mon, 23 Sep 2013 09:27:07 +0000 (02:27 -0700)
CRM/Upgrade/Incremental/php/FourThree.php

index 9747631f825bf170b2b1ce61cade3cd5fecea8b1..887799b2d901eb1d5d21b0fc30c9d08c2dddb2f2 100644 (file)
@@ -862,7 +862,7 @@ ALTER TABLE civicrm_financial_account
     while ($dao->fetch()) {
       // FIXME civicrm_log.modified_date is DATETIME; civicrm_contact.modified_date is TIMESTAMP
       CRM_Core_DAO::executeQuery(
-        'UPDATE civicrm_contact SET created_date = %1, modified_date = %2 WHERE id = %3',
+        'UPDATE civicrm_contact SET created_date = FROM_UNIXTIME(UNIX_TIMESTAMP(%1)), modified_date = FROM_UNIXTIME(UNIX_TIMESTAMP(%2)) WHERE id = %3',
         array(
           1 => array($dao->created, 'String'),
           2 => array($dao->modified, 'String'),