GNOME Bugzilla – Bug 305022
Calendar does not mark the last day for an appointment spanning multiple days
Last modified: 2007-01-17 21:03:26 UTC
Version details: 2.10.1/2.10.0 Distribution/Version: Ubuntu 5.04 / gentoo 2005.0 1) Create an appointment that spans multiple days. 2) Click the calendar and navigate to the month that contains the appointment. 3) Now you can see that the last day of the appointment is not marked (bold).
Here is a patch (against the 2.10.1 version - but it should apply to the latest version in cvs) that should fix the problem. I have not tested this patch yet but I will as soon as I get the time. diff calendar-client.c gnome-panel-2.10.1/applets/clock/calendar-client.c 1829,1841d1828 < static inline int < same_month (time_t t1, time_t t2) { < struct tm *tm; < int t1_mon, t1_year; < < tm = localtime(&t1); < t1_mon = tm->tm_mon; < t1_year = tm->tm_year; < tm = localtime(&t2); < < return (t1_mon == tm->tm_mon && t1_year == tm->tm_year); < } < 1884,1897c1871,1872 < int duration; < < if (same_month (appointment->start_time, appointment->end_time)) < { < duration = day_from_time_t (appointment->end_time) - < day_from_time_t (appointment->start_time); < } < else < { < duration = day_from_time_t (month_end) - < day_from_time_t (appointment->start_time); < } < < for (day_offset = 1; day_offset <= duration / 86400; day_offset++) --- > int duration = appointment->end_time - appointment->start_time; > for (day_offset = 1; day_offset < duration / 86400; day_offset++)
Thanks for your bug/patch. Usually patches are made with the "-u" option and attached as a file to the bug. The patch seems to be reversed too. Could you attach a patch made with "diff -u" to the bug with some explanation of what you changed for the maintainers? I don't get this bug here. Is the appointement using the whole day? Do you use the same timezone setting for evolution and GNOME?
Created attachment 63760 [details] [review] fixes bug took the existing patch above and turned it into a unified diff attachment. tested it on my machine and it works.
This seems to be fixed in Clock 2.14.0 and Evolution 2.6.0. I can reproduce the bug on older versions but not on these versions.
Michael: do you still need this patch? Seems to work fine for me too.
Oops, can reproduce.
Committed.