GNOME Bugzilla – Bug 219643
is_overdue() does not handle DATE values correctly
Last modified: 2013-09-10 14:02:48 UTC
Description of Problem: The tasks table marks tasks that are due tomorrow as being due today if the current UTC time is past midnight. E.g. a user at UTC offset -6 will start seeing tasks due tomorrow as being due today starting around 18:00. This happens because calendar-model.c:is_overdue() does not handle DATE values correctly. Steps to reproduce the problem: 1. Add a task. Make it due tomorrow; make sure this is a DATE value and not a DATE-TIME value by not assigning a time to it. 2. Wait until it is midnight in England. 3. Look at the blue tasks! Extra info: calendar-model.c:is_overdue() is not checking for dt.is_date being set. In this case, dt.tzid will be NULL (DATE values don't have a timezone) and thus it will look like we are requesting the UTC timezone. It should be using model->priv->zone if dt.is_date is set.
This is probably the same bug as bug 218875, so please fix that when you fix this one.
We should now handle all the cases correctly, including when a task is due during the day some time.