From: Michael Date: Fri, 1 Sep 2023 23:47:29 +0000 (+0000) Subject: Fix date time format calculation X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f2d8650d36d228bb94fb84ef2a2e64c1dfc9b3a7;p=friendica.git Fix date time format calculation --- diff --git a/src/Model/Post/Engagement.php b/src/Model/Post/Engagement.php index 2d1f40b6ce..48ce024d49 100644 --- a/src/Model/Post/Engagement.php +++ b/src/Model/Post/Engagement.php @@ -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()]); } }