]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix for bugfix :-)
authorMichael <heluecht@pirati.ca>
Thu, 23 Feb 2017 05:45:06 +0000 (05:45 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 23 Feb 2017 05:45:06 +0000 (05:45 +0000)
include/dbm.php
include/socgraph.php

index 0e12417501efd8cdae28eee5a7e00b8f7c3c39a0..e88f2a4d9d713f0c1e1a85c25278243c7ee27879 100644 (file)
@@ -93,9 +93,9 @@ class dbm {
         * @param string $date a date string in any format
         * @return string SQL style date string
         */
-       public static function date($date) {
+       public static function date($date = 'now') {
                $timestamp = strtotime($date);
-               return date('Y-m-d H:i:s');
+               return date('Y-m-d H:i:s', $timestamp);
        }
 }
 ?>
index 8f6a551d84480054e5886bb6e78528df5615a9cc..a0dd88df2d5d2b50d118509d4fed626ba0be6a4b 100644 (file)
@@ -622,7 +622,7 @@ function poco_last_updated($profile, $force = false) {
                        $last_updated = "0000-00-00 00:00:00";
 
        q("UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'",
-               dbesc(dbm::date($last_updated)), dbesc(datetime_convert()), dbesc(normalise_link($profile)));
+               dbesc(dbm::date($last_updated)), dbesc(dbm::date()), dbesc(normalise_link($profile)));
 
        if (($gcontacts[0]["generation"] == 0))
                q("UPDATE `gcontact` SET `generation` = 9 WHERE `nurl` = '%s'",