Steps to Reproduce

  1. Install Drupal and Date iCal+dependencies
  2. Add a Date field to a content type, collecting only Year/Month/Day
  3. Create a View of content, with two displays: (attached is a view export assuming field_date attached to Page content type)
    1. Feed; style plugin iCal Feed, row plugin iCal Entity
    2. Feed; style plugin iCal Feed, row plugin iCal Fields
  4. Create a piece of content using aforementioned date field.
  5. The display using entities treats the date field as an all-day event, as expected:
    BEGIN:VEVENT
    ...
    DTSTART;VALUE=DATE:20150325
    DTEND;VALUE=DATE:20150326
    ...
    END:VEVENT
    
  6. The display using fields, however, treats the date as occurring at 12:00 AM. The expected behavior was that this would also be treated as an all-day event.
    BEGIN:VEVENT
    ...
    DTSTART:20150325T000000Z
    DTEND:20150325T000000Z
    ...
    END:VEVENT
    
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ChaseOnTheWeb’s picture

The attached patch is how I got around it for my needs; however, I question whether the problem is really somewhere else, as date_ical_plugin_row_ical_entity has very similar code for checking an all-day date and it does not have the same issue.

coredumperror’s picture

Hmmm, this is probably an effect of the Date module's absolutely boneheaded mechanism for determining the difference between All Day dates and normal datetimes. Your patch is probably fine, but I'll see if I can do some detailed debugging to come up with something better.