Fix scheduled_at datetime format mismatch

datetime-local sends ISO format with T separator; normalize to space on save
and use SQLite datetime() in dispatcher query to handle both formats.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-06-03 17:55:11 +03:00
parent 30d2b53075
commit 8ab9b7bbe2
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@ $stmt = $db->prepare("
JOIN projects pr ON pr.id = t.project_id AND pr.is_active = 1
WHERE t.status = 'pending'
AND p.status IN ('pending', 'partial')
AND p.scheduled_at <= ?
AND datetime(p.scheduled_at) <= datetime(?)
ORDER BY p.scheduled_at ASC, t.id ASC
");
$stmt->execute([$now]);