Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daylight savings support #18

Open
davidpanic opened this issue Oct 24, 2022 · 1 comment
Open

Daylight savings support #18

davidpanic opened this issue Oct 24, 2022 · 1 comment

Comments

@davidpanic
Copy link

davidpanic commented Oct 24, 2022

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).

@erkstruwe
Copy link

Please see my comment at #3 (comment) for a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants