fix: time_of_day/day_before reminder times parsed as UTC in calculateSendTime

Also add 'specific' datetime reminder type support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-04-19 23:40:25 +02:00
parent 2acc49ea66
commit 57b55503fd
1 changed files with 6 additions and 2 deletions

View File

@ -220,15 +220,19 @@ class ScheduleEventReminders extends Command
'time_of_day' => Carbon::createFromFormat(
'Y-m-d H:i',
$event->starts_at->setTimezone($tz)->format('Y-m-d') . ' ' . ($reminder['time'] ?? '08:00'),
$tz
'UTC'
)->utc(),
'day_before' => Carbon::createFromFormat(
'Y-m-d H:i',
$event->starts_at->setTimezone($tz)->subDay()->format('Y-m-d') . ' ' . ($reminder['time'] ?? '18:00'),
$tz
'UTC'
)->utc(),
'specific' => isset($reminder['datetime'])
? Carbon::parse($reminder['datetime'])->utc()
: null,
default => null,
};