SUMMARY timezone information being lost when copying events (solved by commit 9f4628aa when creating events) https://invent.kde.org/frameworks/kcalendarcore/-/commit/9f4628aa2c6c90c94fd36d2d4ac8e940adc93680 STEPS TO REPRODUCE 1. Open Korganizer 2. Copy an event with timezone information 3. Export as iCalendar OBSERVED RESULT The copied event in the exported .ics file has missing timezone information EXPECTED RESULT The copied event in the exported .ics file has timezone information SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian Testing (available in About System) KDE Plasma Version: 5.23.5 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.0-2 ADDITIONAL INFORMATION
Thanks to https://bugs.kde.org/show_bug.cgi?id=448846 we investigate further and we find that also moving events directly on calendar views makes timezone information being lost. Timezone information are correctly saved only if you use Event dialog as https://bugs.kde.org/attachment.cgi?id=145781 (useful as a temporary workaround). Greetings! Guido
A possibly relevant merge request was started @ https://invent.kde.org/pim/kcalutils/-/merge_requests/29
A possibly relevant merge request was started @ https://invent.kde.org/pim/eventviews/-/merge_requests/89
Git commit ddbad7221ee1c7736212887d1d64142d6d174000 by Daniel Vrátil. Committed on 23/08/2023 at 16:56. Pushed by dvratil into branch 'release/23.08'. Preserve timezone of original incidence when copy-pasting The destination date-time provided by the caller will likely be in local time, but could theoretically be in any arbitrary timezone. Since we are creating a *copy* it makes sense to preserve the timezone of the original dtStart/dtEnd/dtDue in the incidence. FIXED-IN: 5.24.1 M +20 -5 src/dndfactory.cpp https://invent.kde.org/pim/kcalutils/-/commit/ddbad7221ee1c7736212887d1d64142d6d174000
Git commit def2b7f4cc507bcf8f64540e77dd736ebb751e7d by Daniel Vrátil. Committed on 23/08/2023 at 16:55. Pushed by dvratil into branch 'release/23.08'. Agenda: fix timezone being lost when moving event by drag The code was using QDateTime::toTimeSpec() in attempt to restore the timezone from the original dtStart/dtEnd. However, QDateTime::toTimeSpec() automatically converts Qt::TimeZone timespec to Qt::LocalTime, so the information about timezone was lost and the time was treated as local. The solution is to restore the timezone manually when the original timespec was Qt::TimeZone. FIXED-IN: 5.24.1 M +22 -4 src/agenda/agendaview.cpp https://invent.kde.org/pim/eventviews/-/commit/def2b7f4cc507bcf8f64540e77dd736ebb751e7d
Git commit 916130a1c168c6e36a960c6c706a650b949cc0cc by Daniel Vrátil. Committed on 11/01/2024 at 10:04. Pushed by dvratil into branch 'master'. Agenda: fix timezone being lost when moving event by drag The code was using QDateTime::toTimeSpec() in attempt to restore the timezone from the original dtStart/dtEnd. However, QDateTime::toTimeSpec() automatically converts Qt::TimeZone timespec to Qt::LocalTime, so the information about timezone was lost and the time was treated as local. The solution is to restore the timezone manually when the original timespec was Qt::TimeZone. FIXED-IN: 5.24.1 (cherry picked from commit def2b7f4cc507bcf8f64540e77dd736ebb751e7d) M +22 -4 src/agenda/agendaview.cpp https://invent.kde.org/pim/eventviews/-/commit/916130a1c168c6e36a960c6c706a650b949cc0cc