]> 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 f7aa593cf6f3cd9fb9e6b35877951b0097f7186c..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,6 +37,6 @@ class ExpireConversations
                        return;
                }
 
-               DBA::delete('conversation', ["`received` < UTC_TIMESTAMP() - INTERVAL ? DAY", $days]);
+               DBA::delete('conversation', ["`received` < ?", DateTimeFormat::utc('now - ' . $days . ' days')]);
        }
 }