https://bugs.kde.org/show_bug.cgi?id=525915

--- Comment #4 from Méven <[email protected]> ---
Git commit b8484b253d43dbee87ed8a275428fa731d9e295d by Méven Car.
Committed on 10/10/2026 at 09:04.
Pushed by meven into branch 'master'.

kformat: count the relative day in the time zone of the date

Since 91b1bd20503cfb110a4a9c4bfdd4d2454edeb22c formatRelativeDateTime()
compares the date it gets with the current date in UTC. QDateTime::daysTo()
compares two dates without converting them to the same time zone. In the
evening west of UTC, the UTC date is already the next day, so a local date from
yesterday was shown as a full date instead of "Yesterday".

The word for the day compared the date with the local current date, whatever
the time zone of the date. So a date in UTC was shown as "Tomorrow" in the
evening west of UTC.

Both comparisons now use the current date in the time zone of the date.

Amends: 91b1bd20503cfb110a4a9c4bfdd4d2454edeb22c

M  +31   -0    autotests/kformattest.cpp
M  +2    -0    autotests/kformattest.h
M  +11   -3    src/lib/util/kformatprivate.cpp
M  +1    -0    src/lib/util/kformatprivate_p.h

https://invent.kde.org/frameworks/kcoreaddons/-/commit/b8484b253d43dbee87ed8a275428fa731d9e295d

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to