summaryrefslogtreecommitdiffstats
path: root/apps/files_reminders/lib/Service/ReminderService.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_reminders/lib/Service/ReminderService.php')
-rw-r--r--apps/files_reminders/lib/Service/ReminderService.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_reminders/lib/Service/ReminderService.php b/apps/files_reminders/lib/Service/ReminderService.php
index 5c7193259c1..010f458e872 100644
--- a/apps/files_reminders/lib/Service/ReminderService.php
+++ b/apps/files_reminders/lib/Service/ReminderService.php
@@ -167,7 +167,10 @@ class ReminderService {
}
public function cleanUp(?int $limit = null): void {
- $reminders = $this->reminderMapper->findNotified($limit);
+ $buffer = (new DateTime())
+ ->setTimezone(new DateTimeZone('UTC'))
+ ->modify('-1 day');
+ $reminders = $this->reminderMapper->findNotified($buffer, $limit);
foreach ($reminders as $reminder) {
$this->reminderMapper->delete($reminder);
}