Bug 421400 - KOrganizer: Meeting requests off by one day
Summary: KOrganizer: Meeting requests off by one day
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kcalendarcore
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.110.0
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-12 09:28 UTC by software
Modified: 2023-10-14 08:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.112.0


Attachments
meeting request (15.96 KB, image/jpeg)
2020-05-12 09:28 UTC, software
Details
sent message (14.92 KB, image/jpeg)
2020-05-12 09:29 UTC, software
Details
invitation email (17.61 KB, image/png)
2021-02-16 08:10 UTC, Christophe Marin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description software 2020-05-12 09:28:46 UTC
Created attachment 128384 [details]
meeting request

SUMMARY

Not exactly sure, when this started, but in the last few days I observed, that meeting reqeusts are on day off - see attachements.
I scheduled a meeting for today, but the mail that was sent, "corrected" this to yesterday. I was in serious trouble, because all my vacation requests to my company had the wrong date 8-(

STEPS TO REPRODUCE
1. Create a new event with some attendees.
2. Look at the sent mail in kontact - the date is off by on day.
3. Look at the generated event in the recipient's calendar - the meeting has been created one day earlier than intended.

OBSERVED RESULT

The invitation has a start and stop date off by one day.

EXPECTED RESULT

The invitation has the correct start and stop date.

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed, kernel 5.6.11
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 software 2020-05-12 09:29:07 UTC
Created attachment 128385 [details]
sent message
Comment 2 software 2020-05-17 10:33:16 UTC
KDE Frameworks Version: 5.70.0

Problem still exists.
Comment 3 software 2020-07-07 13:41:10 UTC
Still exists with

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed, kernel 5.7.5
KDE Plasma Version: 5.19.2
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.1

Kontact et al: 20.04.2

Does really no one else have this issue?
Comment 4 software 2020-08-02 19:31:51 UTC
Still exists with latest openSUSE Tumbleweed snapshot:

Kernel: 5.7.11
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0

Kontact et al: 20.04.3
Comment 5 software 2020-08-02 19:33:03 UTC
A few more information after having tested wih kontact and evolution.

As you can see DTSTART and DTEND values differ with wrong values written by korganizer/kmail!

Created a new meeting request with korganizer. The resulting mail looks like this:

BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN
VERSION:2.0
X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER;CN=Michael Hirmke:MAILTO:Michael@hirmke.de
DTSTAMP:20200707T111345Z
ATTENDEE;CN=Hirmke Michael;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;
 ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL;X-UID=93924959565920:mailto:
 mh@mike.franken.de
CREATED:20200707T111303Z
UID:749ecf1f-462b-4040-a0c8-370403aecf60
LAST-MODIFIED:20200707T111303Z
SUMMARY:Test
LOCATION:Test
DTSTART;VALUE=DATE:20200705
DTEND;VALUE=DATE:20200707
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Afterwards I modfied the location using evolution. The resulting mail changed to:

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER;CN=Hirmke Michael:mailto:Michael@hirmke.de
DTSTAMP:20200707T111502Z
CREATED:20200707T111303Z
UID:749ecf1f-462b-4040-a0c8-370403aecf60
LAST-MODIFIED:20200707T111501Z
SUMMARY:Test
LOCATION:Test2
DTSTART;VALUE=DATE:20200706
DTEND;VALUE=DATE:20200708
TRANSP:OPAQUE
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=FALSE;CN=Hirmke Michael;X-UID=93924959565920:mailto:
 mh@mike.franken.de
CLASS:PUBLIC
SEQUENCE:1
X-EVOLUTION-CALDAV-ETAG:a7021d1764d76ad7b77627399df5b9eb
END:VEVENT
END:VCALENDAR
Comment 6 software 2020-08-21 12:01:07 UTC
Still exists with

Kernel: 5.8.0
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0

akonadi-calendar-tools: 20.08.0-1.1
kontact: 20.08.0-1.1
korganizer: 20.08.0-1.1
Comment 7 Christophe Marin 2021-02-16 08:09:19 UTC
Also confirmed in master.

With a test event, 2 days long (22-23 feb 2021), the ics file in the invitation email contains:

DTSTART;VALUE=DATE:20210221
DTEND;VALUE=DATE:20210223

*but*

The invitation email has curious information. Screenshot attached
Comment 8 Christophe Marin 2021-02-16 08:10:01 UTC
Created attachment 135713 [details]
invitation email
Comment 9 Christophe Marin 2021-02-16 08:15:06 UTC
More testing:
1 hour test meeting on the 24th, invitation is correct,
1 day meeting on the 25th, invitation is off and reports there's already the test above scheduled on the same day
Comment 10 Christophe Marin 2021-02-16 08:22:41 UTC
As the events are also synced to a remote server, I checked what it looks like. The events are scheduled correctly there. So that's really something with the invitations sent by mail
Comment 11 Christophe Marin 2021-03-09 20:07:47 UTC
Allen, do you have any clue about this? I would expect to see more users affected by this
Comment 12 software 2021-07-14 08:18:20 UTC
Problem still exists with

Operating System: openSUSE Tumbleweed 20210709
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15,0 GiB of RAM
Graphics Processor: Mesa DRI Intel® UHD Graphics 620

Kontact et al: 21.04.3-1.1
Comment 13 software 2022-12-10 14:41:28 UTC
Still exists with korganizer-22.12.0-1.1.x86_64.

Operating System: openSUSE Tumbleweed 20221209
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 6.0.10-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15,0 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: Dell Inc.
Product Name: XPS 13 9310 2-in-1

Why does nobody have any interest in fixing this bug?
Is it only me, who has this problem? I'd suspect that everyone must have it.
Comment 14 software 2023-02-11 14:42:32 UTC
Still exists with

Operating System: openSUSE Tumbleweed 20230209
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.8-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15,0 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: Dell Inc.
Product Name: XPS 13 9310 2-in-1

korganizer-22.12.2-1.1
korganizer-lang-22.12.2-1.1
Comment 15 software 2023-03-08 20:00:01 UTC
And again - problem still exists.

Operating System: openSUSE Tumbleweed 20230307
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.2.1-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15,0 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: Dell Inc.
Product Name: XPS 13 9310 2-in-1

korganizer-22.12.3-1.1
Comment 16 Daniel Vrátil 2023-10-13 15:57:19 UTC
Turns out this is a rather old bug in the calendar-handling library, probably introduced when porting from KDateTime to QDateTime.
Comment 17 Bug Janitor Service 2023-10-13 16:16:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcalendarcore/-/merge_requests/155
Comment 18 Daniel Vrátil 2023-10-14 08:01:24 UTC
Git commit 921e04f64921e86288e57144c82dab2a1a0679b5 by Daniel Vrátil.
Committed on 13/10/2023 at 19:57.
Pushed by dvratil into branch 'master'.

ICalFormat: don't shift all-day invite dates to UTC

When generating scheduling message for an event, the ICalFormat
checks whether the event is recurrent and if not it shifts the
start and end datetimes to UTC timezone (since recurring events
need TZ information for proper calculations across DSTs and TZs).

However if the event is an all-day event with start and end datetimes
in local time (e.g. Europe/Prague), this shift effectively moves
the start and end datetimes from midnight to -2 hours previous day.
Later on when writing the DTSTART and DTEND properties, the code
omits the time (since it's an all-day event) and only writes out
DATEs, but now the scheduling message is actually shifted one day
back!

This change extends the check in ICalFormat to also avoid shifting
dates to UTC when the event is an all-day event, since in this case
the timezone information is dropped anyway.
FIXED-IN: 5.112.0

M  +24   -0    autotests/testicalformat.cpp
M  +1    -0    autotests/testicalformat.h
M  +1    -1    src/icalformat.cpp

https://invent.kde.org/frameworks/kcalendarcore/-/commit/921e04f64921e86288e57144c82dab2a1a0679b5
Comment 19 Daniel Vrátil 2023-10-14 08:03:39 UTC
Git commit e73b2e4863c589a8b152327ff7c45831d1d1b052 by Daniel Vrátil.
Committed on 14/10/2023 at 10:03.
Pushed by dvratil into branch 'kf5'.

ICalFormat: don't shift all-day invite dates to UTC

When generating scheduling message for an event, the ICalFormat
checks whether the event is recurrent and if not it shifts the
start and end datetimes to UTC timezone (since recurring events
need TZ information for proper calculations across DSTs and TZs).

However if the event is an all-day event with start and end datetimes
in local time (e.g. Europe/Prague), this shift effectively moves
the start and end datetimes from midnight to -2 hours previous day.
Later on when writing the DTSTART and DTEND properties, the code
omits the time (since it's an all-day event) and only writes out
DATEs, but now the scheduling message is actually shifted one day
back!

This change extends the check in ICalFormat to also avoid shifting
dates to UTC when the event is an all-day event, since in this case
the timezone information is dropped anyway.
FIXED-IN: 5.112.0
(cherry picked from commit 921e04f64921e86288e57144c82dab2a1a0679b5)

M  +24   -0    autotests/testicalformat.cpp
M  +1    -0    autotests/testicalformat.h
M  +1    -1    src/icalformat.cpp

https://invent.kde.org/frameworks/kcalendarcore/-/commit/e73b2e4863c589a8b152327ff7c45831d1d1b052