Incorrect Handling of All Day Events

Created on 26 September 2022, over 2 years ago
Updated 4 February 2025, 18 days ago

Problem/Motivation

Importing ICS files that contain all day event causes Drupal to generate nodes that start at 4pm and span two days. For example an all day event on Jan 12 ends up as Jan 11, 4pm to Jan 12, 4pm.

Reviewing the ICS data in my test file shows values of:

  • DTSTART;VALUE=DATE:20230112
  • DTEND;VALUE=DATE:20230113

When importing events that span a period of time (ie: 2pm to 3pm), these events import without any issues. ICS data is formatted slightly differently:

  • DTSTART;TZID=America/Vancouver:20230110T140000
  • DTEND;TZID=America/Vancouver:20230110T150000

Any help is greatly appreciated. My calendar feeds were working fine a few months ago using the 1.x version of this module. That 1.x version recently stopped working and I upgraded to the 2.x branch. The feeds are parsed but now introduce the all day issues outlined above.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada akafitty

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.

  • πŸ‡ͺπŸ‡ΈSpain rcodina Barcelona

    If you export a calendar from Outlook, you will have an unofficial ICS field named X-MICROSOFT-CDO-ALLDAYEVENT which will indicate if it's an "all day" event. However, both 1 day events and N>1 day events can have this field checked. So its impossible to know the difference from 1 day and 2 day events.

  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    Thanks @akafitty and @rcodina! I am going to look into this soon. Are you able to paste a text version of your ICS file, or upload it here? It can be truncated for testing.

    Also to confirm, are your timezone settings in the site America/Vancouver?

    Additionally how are your date fields configured on your events content type?

Production build 0.71.5 2024