Bug 453805 - Text of event reminders does not use local timezone
Summary: Text of event reminders does not use local timezone
Status: RESOLVED FIXED
Alias: None
Product: Reminder Daemon
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-15 05:32 UTC by Kishore Gopalakrishnan
Modified: 2023-01-22 13:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2022-05-15 05:32:50 UTC
SUMMARY
If an event is in another timezone, the reminder text mentions the start time as the time in that timezone, not the user's local timezone. Note that the reminder is displayed at the correct time; this bug is only related to the text that is shown in the notification.

STEPS TO REPRODUCE
1. In Kalendar, create an event in a different timezone from the local one
2. Set a reminder to be shown for it
3. Wait for the reminder

OBSERVED RESULTS
The notification says 'Event starts at $TIME_IN_REMOTE_TIMEZONE' without displaying the name of any timezone (and thus the user assumes it is in the local timezone).

EXPECTED RESULTS
Notification should either say 'Event starts at $TIME_IN_USER'S_CURRENT_TIMEZONE' or display the name of the remote timezone along with the time. (I think the former would be better)

SOFTWARE VERSIONS
kalendarac 5.20.1
kalendar 22.04.1
Operating System: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.3
Kernel Version: 5.15.39-1-lts (64-bit)
Graphics Platform: X11
Comment 1 David E. Narvaez 2022-08-16 00:04:06 UTC
Forget about the timezone: it does not even say what day the event is.
Comment 2 Thomas Fischer 2022-09-15 18:15:32 UTC
(In reply to David E. Narvaez from comment #1)
> Forget about the timezone: it does not even say what day the event is.

I have not tested it myself yet, but it looks like commit 2b832b9d08e4eaca0825 added the date if the event is on another day.
https://invent.kde.org/pim/akonadi-calendar/-/commit/2b832b9d08e4eaca08258e4f372e92a18fed035e

The missing time zone information is not fixed, as the time is formatted as "QLocale::NarrowFormat" which is supposed to format a time in the shortest possible way, basically guaranteeing that no time zone will be shown.
https://doc.qt.io/qt-5/qlocale.html#FormatType-enum

Maybe the code can be refactored to format time differently (longer) if the event's time zone differs from the current time zone?
Comment 3 Bug Janitor Service 2022-11-06 08:51:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/akonadi-calendar/-/merge_requests/47
Comment 4 Carl Schwan 2023-01-22 12:03:27 UTC
Git commit fdbd7e42b6707cf99db48f62d43ca104de632159 by Carl Schwan, on behalf of Kishore Gopalakrishnan.
Committed on 22/01/2023 at 12:03.
Pushed by carlschwan into branch 'release/22.12'.

Convert event start time to user's local timezone

Since we don't display the timezone of the event in the notification,
this is required when the event is in a different timezone from the
user's local one.


(cherry picked from commit 750200aa58e3a8c4073e6304a0e214c1c5beafb9)

M  +1    -1    reminder-daemon/alarmnotification.cpp

https://invent.kde.org/pim/akonadi-calendar/commit/fdbd7e42b6707cf99db48f62d43ca104de632159
Comment 5 Carl Schwan 2023-01-22 13:06:37 UTC
Git commit 750200aa58e3a8c4073e6304a0e214c1c5beafb9 by Carl Schwan, on behalf of Kishore Gopalakrishnan.
Committed on 22/01/2023 at 12:02.
Pushed by carlschwan into branch 'master'.

Convert event start time to user's local timezone

Since we don't display the timezone of the event in the notification,
this is required when the event is in a different timezone from the
user's local one.

M  +1    -1    reminder-daemon/alarmnotification.cpp

https://invent.kde.org/pim/akonadi-calendar/commit/750200aa58e3a8c4073e6304a0e214c1c5beafb9