Line data Source code
1 : #pragma once
2 :
3 : #include <QDate>
4 : #include <QDateTime>
5 :
6 : // T-79.F4/M17: the single convention for task due dates.
7 : //
8 : // Quick-due actions used UTC end-of-day while the CommandBar used local
9 : // midnight — east of UTC a task set to "Today" displayed as tomorrow and
10 : // the overdue/today coloring shifted. Every due-date producer now goes
11 : // through this helper: the LOCAL end of the chosen calendar day. The
12 : // stores persist the value as UTC seconds; converting back with
13 : // toLocalTime() yields the original calendar day in every timezone.
14 : namespace TaskDates {
15 :
16 13 : inline QDateTime endOfLocalDay(const QDate &date) {
17 13 : return date.endOfDay(); // system local time zone
18 : }
19 :
20 : } // namespace TaskDates
|