diff --git a/.gitignore b/.gitignore index 2a712b7..f1e4231 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea build composer.lock docs diff --git a/src/Generators/Ics.php b/src/Generators/Ics.php index c39a993..3679027 100644 --- a/src/Generators/Ics.php +++ b/src/Generators/Ics.php @@ -135,16 +135,16 @@ private function generateAlertComponent(Link $link): array $description = 'Reminder: '.$this->escapeString($link->title); } - $trigger = '-PT15M'; + $trigger = 'TRIGGER:-PT15M'; if (($reminderTime = $this->options['REMINDER']['TIME'] ?? null) instanceof \DateTimeInterface) { - $trigger = 'VALUE=DATE-TIME:'.gmdate($this->dateTimeFormat, $reminderTime->getTimestamp()); + $trigger = 'TRIGGER;VALUE=DATE-TIME:'.gmdate($this->dateTimeFormat, $reminderTime->getTimestamp()); } $alarmComponent = []; $alarmComponent[] = 'BEGIN:VALARM'; $alarmComponent[] = 'ACTION:DISPLAY'; $alarmComponent[] = 'DESCRIPTION:'.$description; - $alarmComponent[] = 'TRIGGER:'.$trigger; + $alarmComponent[] = $trigger; $alarmComponent[] = 'END:VALARM'; return $alarmComponent; diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_with_a_custom_reminder__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_with_a_custom_reminder__1.txt index b799d9e..5532b36 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_with_a_custom_reminder__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_with_a_custom_reminder__1.txt @@ -12,7 +12,7 @@ LOCATION:Party Lane 1A\, 1337 Funtown BEGIN:VALARM ACTION:DISPLAY DESCRIPTION:Party with balloons and cake! -TRIGGER:VALUE=DATE-TIME:20180201T081500Z +TRIGGER;VALUE=DATE-TIME:20180201T081500Z END:VALARM END:VEVENT END:VCALENDAR \ No newline at end of file