Skip to content

DTEND mishandles variable length days and months #233

Description

@mc0e

This is a bug report, for an issue that came up while looking into #221

According to the RFC, when defining the length of a recurring period using DTEND, the length in seconds should be taken from the first event and used as a length in seconds for all events in the series. This is not what recurr does. DateTime::diff() computes the difference between midnight on 1 Jan and midnight on 1 Feb as 1 month, not as 31 * 24 * 60 * 60 = 2678400 seconds, which is what should be used when both DTSTART and DTEND have been provided. With monthly recurrence, that means the next period should be from midnight on feb 1 to midnight on 4 march, supposing a non-leapyear, and no daylight savings shifts.

That's not necessarily the desired behaviour, which is why 'DURATION' exists and defines intervals using calendar units other than seconds.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions