]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/ExpireConversations.php
update the release date in the CHANGELOG file
[friendica.git] / src / Worker / ExpireConversations.php
index aedf7cea518987467cfffcb56c55bf9c277570d4..4b5c4ad584fada2f8bd75f92fd0cdf54a849a776 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
  *
@@ -23,6 +23,7 @@ namespace Friendica\Worker;
 
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Util\DateTimeFormat;
 
 class ExpireConversations
 {
@@ -36,7 +37,6 @@ class ExpireConversations
                        return;
                }
 
-               DBA::p("DELETE FROM `conversation` WHERE `received` < UTC_TIMESTAMP() - INTERVAL ? DAY", $days);
-
+               DBA::delete('conversation', ["`received` < ?", DateTimeFormat::utc('now - ' . $days . ' days')]);
        }
 }