]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use common_sql_now() instead of DB_DataObject_Cast
authorEvan Prodromou <evan@prodromou.name>
Mon, 25 Aug 2008 18:23:38 +0000 (14:23 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 25 Aug 2008 18:23:38 +0000 (14:23 -0400)
darcs-hash:20080825182338-84dde-ec0edef9469b294b7e23945f1bc7d810da988ed7.gz

lib/util.php
scripts/xmppdaemon.php

index 87f97685c15e1092c5bbc94b04c3743b257992b4..efd86ad509e12fc386c4b306409c2c3952eb9e4a 100644 (file)
@@ -988,6 +988,10 @@ function common_date_iso8601($dt) {
        return $d->format('c');
 }
 
+function common_sql_now() {
+       return strftime('%Y-%m-%d %H:%M:%S', time());
+}
+
 function common_redirect($url, $code=307) {
        static $status = array(301 => "Moved Permanently",
                                                   302 => "Found",
index 2fe99bbcf937ed73752745989ec87b05f8532c04..76bd413f98b5544126b979151cb98d25410a3eab 100755 (executable)
@@ -345,7 +345,7 @@ class XMPPDaemon {
                        # (or old)?
                        $this->log(LOG_INFO, 'claiming queue item = ' . $qi->notice_id);
                        $orig = clone($qi);
-                       $qi->claimed = DB_DataObject_Cast::dateTime();
+                       $qi->claimed = common_sql_now();
                        $result = $qi->update($orig);
                        if ($result) {
                                $this->log(LOG_INFO, 'claim succeeded.');
@@ -448,7 +448,7 @@ class XMPPDaemon {
                        # working around some weird DB_DataObject behaviour
                        $confirm->whereAdd(''); # clears where stuff
                        $original = clone($confirm);
-                       $confirm->claimed = DB_DataObject_Cast::dateTime();
+                       $confirm->claimed = common_sql_now();
                        $result = $confirm->update($original);
                        if ($result) {
                                $this->log(LOG_INFO, 'Succeeded in claim! '. $result);