All-day repeating events: end date is the same as start date

Created on 11 November 2014, almost 11 years ago
Updated 22 September 2025, 14 days ago

My Drupal environment is configured as such:

  • Core 7.32
  • Date iCal 7.x-3.3
  • Feeds 7.x-2.0-alpha8
  • Collecting repeating, all-day events. Dates are stored in the database as UTC.

Using the following example,

DTSTART;VALUE=DATE:20141205
DTEND;VALUE=DATE:20141206
RRULE:FREQ=WEEKLY;UNTIL=20141217;BYDAY=SU,MO,TU,WE,TH,FR,SA

the end date is reduced to the start date upon processing i.e., start="2014-12-05", end="2014-12-05".

Digging through the code, I found the offending lines in libraries/ParserVcalendar.inc:

       if (module_exists('date_all_day')) {
          // If the Date All Day module is installed, we need to rewind the
          // DTEND by one day, because of the problem with FeedsDateTime
          // mentioned below.
          $prev_day = iCalUtilityFunctions::_duration2date($property['value'], array('day' => -1));
          $property['value'] = $prev_day;
        }

If I comment out this code, the end date retains the "2014-12-06" value, as expected.

The code comments suggest that this business logic is fragile, and I am wondering what can be done to make it more robust.

For the time being, I'll leave those two lines commented out.

🐛 Bug report
Status

Closed: won't fix

Version

3.0

Component

iCal Import

Created by

🇨🇦Canada mmikitka

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024