GNOME Bugzilla – Bug 769300
Multi all days events end one day too soon
Last modified: 2017-04-17 18:20:40 UTC
Hello, Multi all days events ends one day too soon : - Create a new event (eg. august 14th) - Check all day - Set ending one day (or more) after the staring day (eg. august 15th) => The multi all days events ends one day too soon (eg. august 14th) Thanks !
From what I see, only events, spanning two days, are broken.
(In reply to Ernestas Kulik from comment #1) > From what I see, only events, spanning two days, are broken. Okay, nevermind. I forgot to mark them as all day events.
Created attachment 332354 [details] [review] event: fix _is_multiday() The day difference of all-day events must be zero for them to be not considered multi-day events. This commit changes the logic of the function to reflect that.
Created attachment 332355 [details] [review] month-view: fix multi-day event width allocation Multi-day events are rendered as if they end the day prior to the actual end day. This commit removes the code that makes it so.
Created attachment 332356 [details] [review] month-view: fix all-day multi-day event width allocation All-day multi-day events are rendered as if they end the day prior to the actual end day. This commit removes the code that makes it so.
Thanks Ernestas ! Something else, Calendar crash sometimes, how can I get some debug info to open an issue ?
(In reply to jeremy9856 from comment #6) > Thanks Ernestas ! Something else, Calendar crash sometimes, how can I get > some debug info to open an issue ? This should get you going: https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
Thanks !
Review of attachment 332356 [details] [review]: This is the intended behavior. The ICalendar protocol defines an all-day event this way. I believe the best solution we have here is faking the end date on the Edit dialog to show 1 day before the real end date is (only when it's an all-day event, obviously).
Review of attachment 332354 [details] [review]: This is correct, according to iCalendar protocol. We only have to fake the end date on Edit dialog.
Created attachment 332494 [details] [review] edit-dialog: fake inclusive end of all-day multi-day events Currently, all-day multi-day events are displayed inconsistently with regard to other calendar applications. That is due to strict following of RFC 5545, which mandates non-inclusive all-day multi-day event end dates. This commit makes the edit dialog display a faked date for such events.
Argh, messed the subject line up a bit. But it should be something like that, no?
Review of attachment 332494 [details] [review]: Only aesthetic changes, good work. ::: src/gcal-edit-dialog.c @@ +596,3 @@ end_date = gcal_edit_dialog_get_date_end (dialog); + if (all_day) Please add a comment explaining why this is needed here. I'm pretty sure I'll see this code in the future and wonder why it's here :) @@ +600,3 @@ + GDateTime *fake_end_date = g_date_time_add_days (end_date, 1); + + g_date_time_unref (end_date); Use g_clear_pointer (&end_date, g_date_time_unref);
I have realized that the patch breaks existing single-day events (they all are shown to end before they start). This can be worked around in gcal_event_set_component_internal() by the same means, i.e. adding one day if the start and end dates are equal. Should the patch include it or do we break stuff?
Created attachment 332620 [details] [review] edit-dialog: fake inclusive end date for all-day events Currently, all-day multi-day events are displayed inconsistently with regard to other calendar applications. That is due to strict following of RFC 5545, which mandates non-inclusive all-day multi-day event end dates. This commit makes the edit dialog display a faked date for such events.
Review of attachment 332620 [details] [review]: Sure.
Attachment 332620 [details] pushed as 46a05e5 - edit-dialog: fake inclusive end date for all-day events
Is it possible to have the fix backported to v3.20 please ?
So no backport to 3.20 ?