mirror of
https://github.com/friendica/friendica
synced 2025-04-25 01:10:12 +00:00
Replace references to UTC_TIMESTAMP in SQL queries with a DateTimeFormat generated parameter
This commit is contained in:
parent
ecaed2a845
commit
80da47921e
14 changed files with 37 additions and 28 deletions
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue