Merge lp://qastaging/~gary-wzl77/qtorganizer5-eds/fix_1445577 into lp://qastaging/qtorganizer5-eds

Proposed by Gary.Wang
Status: Superseded
Proposed branch: lp://qastaging/~gary-wzl77/qtorganizer5-eds/fix_1445577
Merge into: lp://qastaging/qtorganizer5-eds
Diff against target: 140 lines (+74/-23)
2 files modified
organizer/qorganizer-eds-engine.cpp (+26/-20)
tests/unittest/event-test.cpp (+48/-3)
To merge this branch: bzr merge lp://qastaging/~gary-wzl77/qtorganizer5-eds/fix_1445577
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Needs Information
Alan Pope 🍺🐧🐱 πŸ¦„ Pending
Review via email: mp+264489@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2015-08-27.

Commit message

remove invalid QTimeZone when converting icaltimetype to QDateTime

Description of the change

remove invalid QTimeZone when converting icaltimetype to QDateTime

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Reading the bug report I would say that the event is losing the timezone when edited. Is the app setting the correct timezone? If the app does not set the timezone the event will be handled as a Floating event.

review: Needs Information
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Actually, there is no such a timezone settings in app. App just follows system timezone.

My Time & Date in system settings
Time zone:
Asia/Shangehai UTC+8

----Create an event (display correctly in weeklyview)
qml: event.name: Ttttt
qml: event.startDateTime: Fri Jul 24 07:00:00 2015 GMT+0800
qml: event.endDateTime: Fri Jul 24 08:00:00 2015 GMT+0800

----Edit an event with only name changed (wrong display and event backs x hours)
qml: event.name: Ttttt-edit
qml: event.startDateTime: Fri Jul 24 07:00:00 2015 GMT+0800
qml: event.endDateTime: Fri Jul 24 08:00:00 2015 GMT+0800

87. By Gary.Wang

Convert local timezone to UTC time zone when parsing start & end datetime
if they're not floating time.

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

I check this issue today and find sth as following:
when user modify a event with start or end date time changed, issue wont' occur.
when user modify a event without start datetime and end date time changed, issue occurs.
Reason for this is if start and end date time are not changed when modification, the timeSpec is for these two datetime is Qt::TimeZone instead of Qt::UTC when parsing them, then
tz.id().constData() == "able/localtime" which cause timezone == null and empty for tzId after icaltimezone_get_builtin_timezone was called.
so finally event backs x(timezone) hours after e_cal_client_modify_objects called.

As I mentioned above, we follow system timezone and have no way to set timezone in qml.
The easy fix is if start & end datetime are not floating time, then we need to convert Local timezone to UTC time zone.
Please review latest MP.
Thanks

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Could you resubmit this MR adding "https://code.launchpad.net/~renatofilho/qtorganizer5-eds/fix-1437305/+merge/261666" as Prerequisite Branch, it will make only your changes visible on the diff. And make it easy to review.

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

OK, I will delete this one later on and create another MP for review since I can't resubmit merge proposal in same branch.
Thanks.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: