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

Wrong timezone handling in scheduling conflicts rrule #942

Open
Nepoh opened this issue Oct 10, 2024 · 0 comments · May be fixed by #985
Open

Wrong timezone handling in scheduling conflicts rrule #942

Nepoh opened this issue Oct 10, 2024 · 0 comments · May be fixed by #985
Assignees
Labels
type:bug Something isn't working

Comments

@Nepoh
Copy link

Nepoh commented Oct 10, 2024

When scheduling multiple events, the admin UI sends a request to check for conflicts. It looks like there is a timezone issue within the generated RRULE, as local time is used in BYHOUR while UTC is used for the start and end timestamps:

POST https://mec.admin.opencast.tum.de/admin-ng/event/new/conflicts
{
    "metadata": "{\"start\":\"2024-10-13T06:10:00.000Z\",\"device\":\"MRI+-+HS-B\",\"duration\":\"6300000\",\"end\":\"2025-01-01T08:55:00.000Z\",\"rrule\":\"FREQ=WEEKLY;BYDAY=TU;BYHOUR=8;BYMINUTE=10\"}"
}

The old admin UI on the other hand used UTC consistently:

{
    "metadata": "{\"start\":\"2024-10-13T06:10:00Z\",\"device\":\"MRI - HS-B\",\"duration\":\"6300000\",\"end\":\"2025-01-01T08:55:00Z\",\"rrule\":\"FREQ=WEEKLY;BYDAY=TU;BYHOUR=6;BYMINUTE=10\"}"
}

As a result, wrong (i.e. non-existing) scheduling conflicts are reported in the UI, preventing event creation. (On the other hand, actual conflicts may remain undetected, but I have not tested this.)

image-2024-10-9_18-2-5

EDIT:

Maybe getUTCHours and getUTCMinutes should be used here?

rrule: `FREQ=WEEKLY;BYDAY=${repeatOn.join()};BYHOUR=${startDate.getHours()};BYMINUTE=${startDate.getMinutes()}`,

@Nepoh Nepoh changed the title Wrong timezone andling in scheduling conflicts rrule Wrong timezone handling in scheduling conflicts rrule Oct 10, 2024
@Arnei Arnei added the type:bug Something isn't working label Oct 10, 2024
@jduehring jduehring self-assigned this Nov 21, 2024
@jduehring jduehring linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants