]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/UpdateGServers.php
Merge pull request #11503 from annando/bulk-delivery
[friendica.git] / src / Worker / UpdateGServers.php
index 38ab6e5d3079f0e55cc3dc4d7cfe9671eaa7c85c..e53754584661cd5ac04e9b8ee02cf3eaeb71f4df 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -25,6 +25,7 @@ use Friendica\Core\Logger;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Strings;
 
 class UpdateGServers
@@ -47,7 +48,7 @@ class UpdateGServers
                }
 
                $total = DBA::count('gserver');
-               $condition = ["`next_contact` < UTC_TIMESTAMP() AND (`nurl` != ? OR `url` != ?)", '', ''];
+               $condition = ["`next_contact` < ? AND (`nurl` != ? OR `url` != ?)",  DateTimeFormat::utcNow(), '', ''];
                $outdated = DBA::count('gserver', $condition);
                Logger::info('Server status', ['total' => $total, 'outdated' => $outdated, 'updating' => $limit]);