]> git.mxchange.org Git - friendica.git/commitdiff
Fix date time format calculation
authorMichael <heluecht@pirati.ca>
Fri, 1 Sep 2023 23:47:29 +0000 (23:47 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 1 Sep 2023 23:47:29 +0000 (23:47 +0000)
src/Model/Post/Engagement.php

index 2d1f40b6ce5e3b9cebb7a3ccace8d45550113d4b..48ce024d4984cb2d30220def89f39d303448a096 100644 (file)
@@ -70,7 +70,7 @@ class Engagement
                        return;
                }
 
-               if ($parent['created'] < DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' 24 hour')) {
+               if ($parent['created'] < DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')) {
                        Logger::debug('Post is too old', ['uri-id' => $item['uri-id'], 'parent-uri-id' => $item['parent-uri-id'], 'created' => $parent['created']]);
                        return;
                }
@@ -93,7 +93,7 @@ class Engagement
 
        public static function expire()
        {
-               DBA::delete('post-engagement', ["`created` < ?", DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' 24 hour')]);
+               DBA::delete('post-engagement', ["`created` < ?", DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')]);
                Logger::notice('Cleared expired engagements', ['rows' => DBA::affectedRows()]);
        }
 }