Bug 182323 - During timezone translation, dates are not translated
Summary: During timezone translation, dates are not translated
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 17:29 UTC by garbage.angel
Modified: 2009-05-11 22:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case (91.08 KB, text/calendar)
2009-01-29 17:39 UTC, garbage.angel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description garbage.angel 2009-01-29 17:29:13 UTC
Version:           4.2 rc1 (using KDE 4.2.0)
OS:                Linux
Installed from:    Ubuntu Packages

When importing an .ics file with events in it listed as UTC (times ends in Z), and when user timezone is Eastern (GMT-5, America/New_York), events that are on different days between the timezone do not appear in week view and appear on the wrong day in month view.

For instance: an event that occurs in January 2 0100 to 0200 in UTC but occurs in January 1 2000 to 2100 in GMT-5 will be listed under January 2 in month view, and not at all in week view.

I believe this is because korganizer only shifts the time by the number of hours required to translate the timezone, but it doesn't test whether that time shift will result in crossing a date boundary.

Google calendar seems to handle this okay. I will attach an example .ics. The times are defined in UTC and user selected timezone should be set to GMT-5. Compare with results from Google calendar.

In case the start time is on the same day in both timezones but the end time is different day in both timezones, the event is duplicated, like in bug #173381 https://bugs.kde.org/show_bug.cgi?id=173381. 

And also, although I installed 4.2.0 packages from kubuntu experimental repo, the about dialog in korganizer lists 4.2 rc1, although the package name is: 4:4.2.0-0ubuntu1~intrepid~ppa3. I don't think this is that relevant.
Comment 1 garbage.angel 2009-01-29 17:39:02 UTC
Created attachment 30719 [details]
Test case

Note that there are a lot of events in H2 2008, visible only on month view, and on the wrong date when user time zone is America/New_York.

Err...warning, some of the items might be considered inappropriate, but it was the biggest real-life test case I could find, which some entries that work, some entries that half-work, and some entries that don't work at all.
Comment 2 garbage.angel 2009-01-29 18:07:22 UTC
Also, I don't know if this is relevant but here are the libical version numbers. They are Ubuntu Intrepid packages:

libical-dev 0.33-1
libical0 0.33-1

Jaunty has a much never version (0.43-2) but I don't know if libical is the problem here.
Comment 3 Sergio Martins 2009-05-09 14:53:26 UTC
SVN commit 965588 by smartins:

When converting KDateTime to QDate, use the user's timezone, not the incidence's, otherwise events can be shown at wrong dates in 
korganizer.

Review: http://reviewboard.kde.org/r/674/

BUG: 173381
BUG: 182323


 M  +15 -11    kodaymatrix.cpp  
 M  +9 -6      views/agendaview/koagendaview.cpp  
 M  +8 -3      views/monthview/monthview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=965588
Comment 4 Sergio Martins 2009-05-11 22:21:00 UTC
SVN commit 966745 by smartins:

Backport r965588 by smartins from trunk to the 4.2 branch:

When converting KDateTime to QDate, use the user's timezone, not the incidence's, otherwise events can be shown at wrong dates in 
korganizer.

Review: http://reviewboard.kde.org/r/674/

CCBUG: 173381
CCBUG: 182323
line, and those below, will be ignored--
M    korganizer/kodaymatrix.cpp
M    korganizer/views/monthview/monthview.cpp
M    korganizer/views/agendaview/koagendaview.cpp


 M  +7 -4      kodaymatrix.cpp  
 M  +9 -6      views/agendaview/koagendaview.cpp  
 M  +8 -3      views/monthview/monthview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=966745