-> convert to Tinebase_DateTime before comparing the dates
Change-Id: I4842d99fbf35910a9505035fb79daf409bf118aa
Reviewed-on: http://gerrit.tine20.com/customers/1584
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
if (in_array($fieldName, $this->_datetimeFields)) {
if ($ownField instanceof DateTime
&& $recordField instanceof DateTime) {
+
+ if (! $ownField instanceof Tinebase_DateTime) {
+ if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ .
+ ' Convert ' . $fieldName .' to Tinebase_DateTime to make sure we have the compare() method');
+ $ownField = new Tinebase_DateTime($ownField);
+ }
+
if ($ownField->compare($recordField) === 0) {
continue;
} else {