Skip to content

Daylight savings support #18

Open
Open
@davidpanic

Description

Currently the occurrences() function (and possibly others) does not respect daylight savings. This means that a recurrence rule that crosses daylight savings will report wrong times for occurrences in the new time zone.

iCAL uses the VTIMEZONE field to specify the event creation timezone, it should be handled and report the correct times.

As an example run this query:

SELECT _rrule.occurrences(
    _rrule.rrule('RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE;UNTIL=20221105T000000Z'),
    '2022-10-26T05:00:00'::timestamp,
    '[2022-10-24, 2022-11-04]'::tsrange
);

This is the current transition from CEST to CET in europe, canonically this is the Europe/Belgrade time zone.
There is currently no way to pass that information to the function. It should return the following occurrences: 2022-10-26T05:00:00+02:00, 2022-10-26T05:00:00+01:00 if we assume the returned time zone is UTC (currently it returns the time without time zone).

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