From 6abc38c8e2283c189a7ca7fdd1b0bffcbea16463 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 21 Mar 2014 20:59:46 +0100 Subject: [PATCH] properly generate full-day ical events --- README.rst | 9 ++++++++- src/bdrem/Renderer/Ical.php | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index c910740..703dfcb 100644 --- a/README.rst +++ b/README.rst @@ -83,7 +83,7 @@ Make sure your config file contains ``$mail_from`` and ``$mail_to`` settings. iCalendar ========= -Exporting birthday events into an ics file is easy:: +Exporting birthday events into an ``.ics`` file is easy:: $ bdrem --renderer=ical > birthdays.ics @@ -91,6 +91,13 @@ It is possible to access the calendar via HTTP, too:: http://example.org/bdrem/?renderer=ical +You can subscribe to it in your calendar or email application. +Integration has been tested with Thunderbird's Lightning__ and Claws Mail's +vCalendar__ plugin. + +__ https://addons.mozilla.org/en-US/thunderbird/addon/lightning/ +__ http://www.claws-mail.org/plugin.php?plugin=vcalendar + HTML page ========= diff --git a/src/bdrem/Renderer/Ical.php b/src/bdrem/Renderer/Ical.php index 63a9028..7383acc 100644 --- a/src/bdrem/Renderer/Ical.php +++ b/src/bdrem/Renderer/Ical.php @@ -58,9 +58,7 @@ class Renderer_Ical extends Renderer . '.' . $event->age . '.' . md5($event->title . '/' . $event->type) . '@bdrem'; - // we want the zero time because it expresses midnight in every - // time zone - $props['DTSTART'] = str_replace('-', '', $event->localDate) . 'T000000'; + $props['DTSTART;VALUE=DATE'] = str_replace('-', '', $event->localDate); $props['DURATION'] = 'P1D'; $props['SUMMARY'] = sprintf( '%s - %s. %s', $event->title, $event->age, $event->type -- 2.30.2