Calendar's .ics individual event file importing dialog does not preview times in user's local timezone, and does not respect 24-hours vs 12-hours AM PM format
To reproduce:
- Download this sample .ics file (from issue #790 (closed)), which has UTC times* using the "Z" format, such as:
DTSTAMP:20220202T224658Z
DTSTART:20220208T123000Z
DTEND:20220208T133000Z
- In Nautilus, right-click the file, "Open With…", and choose GNOME Calendar nighly (instead of Evolution, if installed)
- Observe the resulting "Import 1 event" dialog's previews, vs what actually gets imported/saved after the process is done
*Tip: before importing, you can edit the .ics file with a text editor, to replace all the 2022
by the current year to facilitate testing.
Actual results
With the nightly / 46 version, the resulting dialog appears, with the UTC times rendered as if they were the local system's time (i.e. they always show up as being 12:30 to 13:30, no matter what your local timezone is):
|
|
---|---|
Note that this is just displaying the wrong times in that particular preview dialog; the event that actually gets imported/saved by the backend into the resulting views (month view, week view, etc.) is correctly stored as UTC and displayed at the user's local timezone… for example:
Expected results
The bugfix needed here is two things:
- Use the user's local system timezone to display/preview the times in Calendar's individual file import wizard dialog
- Use the system Settings (from GNOME Settings / gsettings) to display the time in 24-hours vs 12-hours (AM/PM) format, like the rest of GNOME Calendar's UI components.
Potentially related gotcha for the future: inversely, #171 would require events to be rendered in the local time instead of being considered UTC to be converted!