Skip to content

[BUG]: allDay property is set to true for non-all-day events #171

Description

@Programie

Describe the bug
I have some events which don't have an end-date (i.e. the end date is the same as the start date). Every calendar application is correctly handling that event as a non-all-day event. But in case of this Node-RED module, those events are flagged as all-day events (i.e. allDay of those events is set to true).

To Reproduce
Steps to reproduce the behavior:

  1. Create an event on your calendar server and select the same date/time for start date and end date
  2. Connect a trigger to the "upcoming" node and connect that node to a debug node
  3. Trigger the node
  4. The data shown in the debug node includes allDay: true for the previously created non-all-day event

Expected behavior
The event should have allDay: false in case the event is not an all-day event.

node-red-contrib-ical-events

  • Version: 2.2.5
  • node-red version: 3.1.5
  • nodejs version: 16.20.2
  • is it an ical, caldav or icloud calendar? CalDAV

Logs / Additional context
Example calendar file:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//SabreDAV//SabreDAV//EN
X-WR-CALNAME:Test
X-APPLE-CALENDAR-COLOR:#499AA2
REFRESH-INTERVAL;VALUE=DURATION:PT4H
X-PUBLISHED-TTL:PT4H
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20240216T195606Z
DTSTAMP:20240216T195900Z
LAST-MODIFIED:20240216T195900Z
SEQUENCE:3
UID:27d5b79f-bfb0-4f22-874f-e81e8162e074
DTSTART;TZID=Europe/Berlin:20240220T100000
DTEND;TZID=Europe/Berlin:20240220T100000
STATUS:CONFIRMED
SUMMARY:Test
END:VEVENT
END:VCALENDAR

JSON output from the "upcoming" node:

[
    {
        "date": "2/20/24, 10:00 AM",
        "eventStart": "2024-02-20T09:00:00.000Z",
        "eventEnd": "2024-02-20T09:00:00.000Z",
        "summary": "Test",
        "duration": "PT0S",
        "durationSeconds": 0,
        "rruleText": null,
        "uid": {
            "uid": "27d5b79f-bfb0-4f22-874f-e81e8162e074",
            "date": "1708419600000"
        },
        "isRecurring": false,
        "datetype": "date",
        "allDay": true,
        "calendarName": "Test",
        "originalEvent": {
            "component": [
                "vevent",
                [
                    [
                        "created",
                        {},
                        "date-time",
                        "2024-02-16T19:56:06Z"
                    ],
                    [
                        "dtstamp",
                        {},
                        "date-time",
                        "2024-02-16T19:59:00Z"
                    ],
                    [
                        "last-modified",
                        {},
                        "date-time",
                        "2024-02-16T19:59:00Z"
                    ],
                    [
                        "sequence",
                        {},
                        "integer",
                        3
                    ],
                    [
                        "uid",
                        {},
                        "text",
                        "27d5b79f-bfb0-4f22-874f-e81e8162e074"
                    ],
                    [
                        "dtstart",
                        {
                            "tzid": "Europe/Berlin"
                        },
                        "date-time",
                        "2024-02-20T10:00:00"
                    ],
                    [
                        "dtend",
                        {
                            "tzid": "Europe/Berlin"
                        },
                        "date-time",
                        "2024-02-20T10:00:00"
                    ],
                    [
                        "status",
                        {},
                        "text",
                        "CONFIRMED"
                    ],
                    [
                        "summary",
                        {},
                        "text",
                        "Test"
                    ]
                ],
                []
            ],
            "_rangeExceptionCache": {},
            "exceptions": {},
            "rangeExceptions": []
        },
        "countdown": {
            "days": 3,
            "hours": 13,
            "minutes": 0,
            "seconds": 51
        },
        "on": false
    }
]

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions