Fix stuck 'Today' and 'Yesterday' dates
This merge request fixes https://bugs.kde.org/show_bug.cgi?id=484119: message-list entries keep being stuck at 'Today' even after the day has changed.
The root cause is in the implementation of DateFormatterPrivate, which
implicitly assumes that the object will never live beyond midnight. This
assumption is violated within KMail: a long-lived DateFormatter object
is held by MessageList::Core::Manager, causing the display bug
described above.
To fix this, introduce a timer that refreshes the reference time point every day at (or very shortly after) midnight.
Also apply a bit of clean-up work and fix an edge case where a timestamp in the interval (23:59:59.000; 23:59:59.999] was not correctly classified as 'Today'.
todo (blocking):
-
Verify that the fix actually works. - Tested on Fedora 40 by running
LD_LIBRARY_PATH=. /usr/bin/kontactfrom thebuild-release/bindirectory.
- Tested on Fedora 40 by running