Bug 483061

Summary: Akonadi server does not declare UTC times as UTC
Product: [Frameworks and Libraries] Akonadi Reporter: Joshua J. Kugler <joshua>
Component: serverAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: carl, dvratil, nicolas.fella, thiago
Priority: NOR Keywords: qt6
Version: 6.0.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Joshua J. Kugler 2024-03-10 03:03:11 UTC
SUMMARY

STEPS TO REPRODUCE
1. Try to access e-mail in a time when you are going to "spring forward" and it generates an atime with a time between 2AM and 3AM.

OBSERVED RESULT
KMail hangs and gets the dreaded "Retrieving folder contents" hang. This error is seen in the logs:

Error text: "Incorrect datetime value: '2024-03-10 02:15:10' for column `akonadi`.`pimitemtable`.`datetime` at row 1 QMYSQL: Unable to execute statement"

This tipped me off: https://linustechtips.com/topic/1028839-mariadb-need-help-incorrect-datetime-value-2018-03-25-022324/

Conclusion: Akonadi is inserting time as UTC, but not declaring it UTC, and the DB server is saying "That's not a valid time in my time zone!" (I'm currently in Americas/Anchorage).

Yes, I also am a programmer. Yes, I also hate date/time math.

EXPECTED RESULT
Message loads.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Neon all packages up to date
(available in About System)
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Now that is after 2024-03-10 03:00:00 UTC, I can once again access my e-mails. :)
Comment 1 Joshua J. Kugler 2024-03-11 18:11:52 UTC
It occurred to me this could also cause a problem with receiving e-mail. The "datetime" column is also a timestamp, and if Akonadi gets an e-mail that was sent between 2AM and 3AM UTC on a daly light savings change day, it could throw an error when trying to store it. Possibly resulting in data loss? I'm not sure.
Comment 2 Thiago Macieira 2024-03-11 19:22:13 UTC

*** This bug has been marked as a duplicate of bug 483060 ***