fix: notif

This commit is contained in:
2025-12-13 16:13:19 +03:30
parent ba10906673
commit e0ade2d748
+3 -3
View File
@@ -25,7 +25,7 @@ class SendDueReminders extends Command
*/
public function handle(): int
{
$now = now();
$now = now();
$currentTime = $now->toTimeString(); // HH:MM:SS
$this->info("Current time: {$now}");
@@ -33,8 +33,8 @@ public function handle(): int
$reminders = Reminder::with(['user', 'packageName'])
->where(function ($query) use ($now, $currentTime) {
// Compare only the TIME portion
$query->whereRaw('TIME(time) <= ?', [$currentTime])
// For PostgreSQL: Cast datetime to time for comparison
$query->whereRaw('time::time <= ?', [$currentTime])
->where(function ($sub) use ($now) {
// Non-repeatable: send once
$sub->where('repeatable', false)