Bug 481305 - Recurrence deletion for events created in another timezone does not work
Summary: Recurrence deletion for events created in another timezone does not work
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: incidence editors (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-14 02:53 UTC by tusooa
Modified: 2024-02-21 07:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 24.02
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2024-02-14 02:53:22 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
If a recurring event is created in another timezone, and the date on which the event falls in your local timezone is different from the date on which it falls in the creation timezone, deleting one recurrence will not work.

STEPS TO REPRODUCE
1. Set system timezone to America/Toronto
2. Create an event from 2023-06-18 2:00 AM **UTC** to 3:00 AM **UTC**.
3. Set the recurrence to "Repeat weekly, every 1 week" on: Sunday, ends: never
4. In the Agenda view, delete the instance on 2024-02-17 (this is a Saturday, but the corresponding UTC time falls on a Sunday). In the popup dialog, click "Delete Current."

OBSERVED RESULT
The recurrence is not deleted. If you Edit the event again, you can see that 2024-02-17 is set as an exception.

EXPECTED RESULT
The recurrence should be deleted. If you Edit the event again, you should see that 2024-02-18 (not 17) is set as an exception.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.6.13-gentoo-x86_64 / 5.27.10
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2024-02-19 11:00:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/korganizer/-/merge_requests/117
Comment 2 Daniel Vrátil 2024-02-19 13:00:35 UTC
Git commit 8121e4aedb67660dbea3654a569121cd9e463422 by Daniel Vrátil.
Committed on 19/02/2024 at 10:59.
Pushed by dvratil into branch 'release/24.02'.

Use correct timezone when creating recurrence exception

When an incidence occurs on a different day in its original timezone
than in the user's local timezone, deleting a recurrence gives us
a date in the user's local timezone. However, in order for the
recurrence exception to work, the exception date must fall on a date
in the incidence's original timezone.

This change makes sure that the recurrence exception is correctly
converted from local time to the incidence's original timezone before
storing it.

This commit only covers deleting a recurrence ocurrence from KOrganizer
event view. Additional similar patch for the Incidence Editor is needed
to show/create exceptions correctly there.
FIXED-IN: 24.02

M  +5    -3    src/calendarview.cpp

https://invent.kde.org/pim/korganizer/-/commit/8121e4aedb67660dbea3654a569121cd9e463422
Comment 3 Daniel Vrátil 2024-02-21 07:59:42 UTC
Git commit cedb100cb3158d0071358e4c1cc73bbda35412e0 by Daniel Vrátil.
Committed on 21/02/2024 at 07:44.
Pushed by dvratil into branch 'master'.

Correctly handle timezone of recurrence exceptions

An incidence can occur on a different day in its original timezone
than in the user's local timezone. The incidence editor's exception
recurrence editor should always show the exception dates in the
user's local timezone.

M  +9    -5    src/incidencerecurrence.cpp

https://invent.kde.org/pim/incidenceeditor/-/commit/cedb100cb3158d0071358e4c1cc73bbda35412e0