]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Memcached_DataObject.php
Merge branch '0.9.x' into 1.0.x
[quix0rs-gnu-social.git] / classes / Memcached_DataObject.php
index b92b67e77557530827ca2bc919c9832dea77ad56..97f793f4d8a871e77ad013f4f2d4082c4b3dac83 100644 (file)
@@ -341,6 +341,7 @@ class Memcached_DataObject extends Safe_DataObject
         $fail = false;
         $result = null;
         if (Event::handle('StartDBQuery', array($this, $string, &$result))) {
+            common_perf_counter('query', $string);
             try {
                 $result = parent::_query($string);
             } catch (Exception $e) {
@@ -494,6 +495,10 @@ class Memcached_DataObject extends Safe_DataObject
                     }
                 }
             }
+            // Needed to make timestamp values usefully comparable.
+            if (common_config('db', 'type') == 'mysql') {
+                parent::_query("set time_zone='+0:00'");
+            }
         }
 
         return $result;