Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, date_ical doesn't support Multi-day All Day events.
In its current form, the dev version works just fine except that it's off by 1 day (too long). This is happening because the extra day added due to RFC 2445/5545 loses its "All Day" meaning and the entity created will be 1 day longer than it should be. Otherwise everything else works fine.
Comment | File | Size | Author |
---|---|---|---|
#1 | date_ical-multi-all-day-support-1941076-1.patch | 1.79 KB | vlad.pavlovic |
Comments
Comment #1
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedAttached is a patch that will make Multi-day All Day events work properly.
Let me know if there are issues.
Comment #2
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedPushed to dev.
Comment #3
tramm CreditAttribution: tramm commentedNow multi-day events seem to be supported (time specifications are removed), but still +1 day is added to end date. This also applies to full-day events lasting one day, which are rendered lasting two days instead:
I even explicitly rechecked if I have the patch installed, yes I do! For some reason it's not working.
Comment #4
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedYou have the latest dev version installed?
One day all day events were fine even before this patch. Do you mind sharing the URL of your events and/or the URL for ics file. Also, what are your timezone settings for the site?
Comment #5
coredumperror CreditAttribution: coredumperror commentedThe reason that +1 day is added is because the RFC that defines iCal states that DTEND is an non-inclusive boundary on the duration of the event. An All-Day event taking place on March 20th should, therefore, look like this:
... And now that I've done a bunch of research, reading through multiple RFCs (iCal was re-defined in RFC 5545, I actually read your post in detail. You're saying that Date iCal is rendering a single day all-day event with 2 days of difference between DTSTART and DTEND? If so, that's definitely a bug with Date iCal.
Maybe the Date module was recently updated to store the end date for single day all-day events differently? Date iCal may no longer need to manually add an extra day to conform to RFC.
Comment #6
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedThe +1 day needs to be there for single day, all day events. Date module hasn't been updated since August (Sept for dev) and it still stores the "To Date" to be the same value as the From date for a single all day (stored as UTC).
Comment #7
coredumperror CreditAttribution: coredumperror commentedHmmm, then we'll need to get more detailed info from tramm, I suppose.
Comment #8
tramm CreditAttribution: tramm commentedThe site under discussion is: http://piraadipartei.ee/. Events are in the right column and the iCal link is just below them. All the events have correct start/end times if I view them as pure content.
If we take event from March 20th that I used in an example http://piraadipartei.ee/node/28796 and compare it to iCal file, one day is added. The same happens for multi-day events (see the event of 19.04–21.04 "PPI konverents").
Date iCal: 7.x-2.6+8-dev
iCalcreator: 2.16.12
Date: 7.x-2.6
Drupal: 7.18
Timezone: Europe/Tallinn UTC +0200
Comment #9
vlad.pavlovic CreditAttribution: vlad.pavlovic commentedDo you have the Date All Day (date_all_day, comes with the Date module package) module installed? And are these events marked as 'All day'? From what I can tell these events (in your content) are showing as 12AM to 12AM events. Though you may have done this override on purpose. I just want to be sure.
Comment #10
tramm CreditAttribution: tramm commentedI have to admit, that Date All Day module was turned off. However, turning it on didn't make a difference. I have all day checkboxes turned on now, but end times from iCal still have one extra day added to them.
Comment #11
coredumperror CreditAttribution: coredumperror commentedIt's possible that something got messy when you enabled All Day mode on existing date fields. I'd suggest making a new date field for testing, have it be All Day enabled from the start, and see if the dates that come from that field also get messed up.
Also, could you please make a screenshot of your node edit form, showing the data you're entering for date fields which display this off-by-one error, then also include the .ics file that is built from that node? I want to make really sure that we're both talking about the same thing, rather than possibly talking past each other through misinterpreting the output from Date iCal.