Creating an all day event that is usable by iCal

I was wondering how one goes about creating an All Day event. I tried creating an event and omitting the date/time component, which looks as follows:

[event start="2023-03-20" status="public" name="My Event" end="2023-03-23" allowedGroups="trust_level_0"]

However, when I attempt to add this event to my calendar (i.e., iCal export), I get an iCal file that looks as follows:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Discourse//EN
BEGIN:VEVENT
UID:1679270400000_1679529600000
DTSTAMP:20230121T192236Z
DTSTART:20230320T000000Z
DTEND:20230323T000000Z
SUMMARY:My Event
END:VEVENT
END:VCALENDAR

Outlook does not recognize such an event as an all-day event. I can achieve that when I edit the iCal file myself as follows—changing the start and end timestamps to date-only values:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Discourse//EN
BEGIN:VEVENT
UID:1679270400000_1679529600000
DTSTAMP:20230121T192236Z
DTSTART;VALUE=DATE:20230320
DTEND;VALUE=DATE:20230323
SUMMARY:My Event
END:VEVENT
END:VCALENDAR

Is it possible to create an event that will automatically be treated by calendar software as an all-day event?

Hello !

Full days events goes from midnight to midnight. In the details, the event is displayed on two days : Fri, Feb 13 → Sat, Feb 14 for an event on Fri, Feb 13 only.

I may work on this, but not really soon.

Reproduction:

  1. Create an event that goes from midnight to midnight
  2. The date displayed when opening the post lists the two days

Expectation:
The date is the day of the event only.

3 Likes

I believe it is the same problem as

The fix is to not add the time to the start/end of the event.

1 Like

The bug influences both the personal calendars and “add the event to google calendar” button.

I patched this in the plugin linked below.

Hopefully, these changes can be taken over by the team :folded_hands:

1 Like

@here should hopefully be fixed by

3 Likes

Just merged these, but the result is a bit messy sorry. At least this long standing bug is now sorted (had noticed it too, but never got around to reporting it)

1 Like