Community
Participate
Working Groups
The date stamps used to store scheduling information in the task list use local timestamps, e.g.: ScheduledEndDate="2007-10-30 23:59:59.999 PDT" ScheduledStartDate="2007-10-30 00:00:00.0 PDT" If the local time zone changes the date range would span two days instead of one specific day.
I do not think storing the dates in UTC will solve anything as they are already stored with their timezone and converted to the local timezone. A specific day in Vancouver does not line up with a specific day in Tokyo no matter how you represent them; converting to UTC only changes the units. We need some way of converting between day ranges in different time zones. I think the correct solution is for the day date bins to include any task scheduled for a specific day (in any time zone) where that day's midpoint falls within the range of that bin. This will mean that if I am in Tokyo and I schedule a task for Tuesday, when I go to Vancouver (and restart Eclipse so that the JVM updates its default time zone), the task will show under Monday, which is probably correct because Vancouver is more than 12 hours behind Tokyo. I have a working implementation of this. I will attach a patch once I have got egit back into a sane state (hopefully tomorrow).
Ignore my previous comment. This bug causes quite a bad bug where tasks scheduled while travelling do not show up in the scheduled presentation at all. We can mostly fix that in the UI by just being more lenient about which tasks to show in a bin. We can determine what day a task was scheduled for based on the scheduled date (a 24 hour period) and the current time zone, and we can simply show the task in the corresponding bin. I have implemented this and it works except for the UTC+12 to UTC+14 timezones, which we cannot distinguish from UTC-12 to -10. This only deals with scheduled dates but it would probably be straightforward to do the same thing for due dates. Here is a review: http://review.mylyn.org/#change,378
Created attachment 212877 [details] tasklists.png Here is a screenshot showing the same task list in different time zones. I created a bunch of tasks named according to their schedule date and time zone. You can see that it works well except for the tasks scheduled for UTC+13. I'll add a comment to the review giving more detail about that.
Thanks for the change, Sam. Can you add a bunch of test cases for the different time zones?
I will look into this next week.
Sam, are you planning to do this for 3.8?
Yes, I am planning to do this early next week.
I have added tests and also fixed due dates. The problem for due dates is not as serious - due tasks still show up in the task list, they just show up a day early if you travel West - because they are represented as the start of a day rather than the whole day. But I thought it would make sense for due and scheduled dates to have the same behaviour, that is, that tasks never change date bins as the result of a time zone change. 5990: NEW - bug 250865: scheduling information incorrect when local time zone changes https://bugs.eclipse.org/bugs/show_bug.cgi?id=250865 [I0ae81f95] https://git.eclipse.org/r/#change,5990
Steffen: Assuming that 3.8 goes with this defect, should we make this a "know issue"? The bahavior is bad enough that I think we need to inform users of it, and instruct them to not switch their timezones.
This just happened to me again on planning and possibly other tasks. This bug is really bad when it happens. Steffen: Have we added a known issue on this?
The fix has been merged. Should we leave this open to verify it?
Thanks Sam! Let's close it and mark as verified if it works as intended and reopen if it doesn't.
*** Bug 330244 has been marked as a duplicate of this bug. ***