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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vlad.pavlovic’s picture

Attached is a patch that will make Multi-day All Day events work properly.
Let me know if there are issues.

vlad.pavlovic’s picture

Status: Active » Fixed

Pushed to dev.

tramm’s picture

Now 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:

DTSTART;VALUE=DATE:20130320
DTEND;VALUE=DATE:20130322

I even explicitly rechecked if I have the patch installed, yes I do! For some reason it's not working.

vlad.pavlovic’s picture

You 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?

coredumperror’s picture

The 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:

DTSTART;VALUE=DATE:20130320
DTEND;VALUE=DATE:20130321

... 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.

vlad.pavlovic’s picture

The +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).

coredumperror’s picture

Status: Fixed » Postponed (maintainer needs more info)

Hmmm, then we'll need to get more detailed info from tramm, I suppose.

tramm’s picture

Status: Postponed (maintainer needs more info) » Fixed

The 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

vlad.pavlovic’s picture

Do 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.

tramm’s picture

I 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.

coredumperror’s picture

It'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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.