properly generate full-day ical events
authorChristian Weiske <cweiske@cweiske.de>
Fri, 21 Mar 2014 19:59:46 +0000 (20:59 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 21 Mar 2014 19:59:46 +0000 (20:59 +0100)
README.rst
src/bdrem/Renderer/Ical.php

index c910740aca33485e51ef879e9328eac20268df81..703dfcb437dcd7ddbe35b3793e67fb0fca05a76b 100644 (file)
@@ -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
 =========
index 63a9028e16ea93591b8312cd39a3ce44dfd8b5a5..7383accc67e756a408bed10ff31f1cda9e6d6ed6 100644 (file)
@@ -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