Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.7
-
None
Description
As documented https://doc.qt.io/qt-6/qtqml-cppintegration-data.html#qdate-and-javascript-date , QDate and QTime usage in QML is extremely error prone, resulting in off-by-one bugs if one isn't super careful. While some "mitigation" exists (like only calling UTC-named Date functions), formatting would still return the local time, and so on.
I think these conversions should be outright deprecated, and removed in a ".pragma strict" QML. If the user needs to carry a
struct Date { int year,month,day; }
they can create their own value type. I don't see any value at having "convenience" which comes with so many traps attached.
Attachments
Issue Links
- relates to
-
QTBUG-114525 Implement ECMAScrip'ts Temporal in QML's V4 engine
- Open