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
parent
2acc49ea66
commit
57b55503fd
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue