diff options
author | Mitch Curtis <[email protected]> | 2025-06-19 13:56:17 +0800 |
---|---|---|
committer | Mitch Curtis <[email protected]> | 2025-06-30 13:31:50 +0800 |
commit | 57325020f65665d91e63dc300d674a8e8dc411f1 (patch) | |
tree | 9cf538f41d7b47fb33aa4508353016690bd9b155 /src/qml/compiler/qv4compiler.cpp | |
parent | aa1d3e416edd092f3dc8f8a20f15bd92baa93485 (diff) |
When a QDate is passed to QML, it becomes to a JavaScript Date.
As Dates are stored in local time, the QDates we were passing to
QML had the potential to be one day off in certain timezones.
For example: 00:00 UTC converted to UTC-8 is 20:00 the day before.
Fix this by storing and providing dates as QDateTime so that we can
give it a time of day that can't possibly result in a different day
when converted to local time. It's fine to change the C++ API since
it's private, and nothing will change for the type that users see,
since they always get a Date.
Add a SystemEnvironment singleton to QQuickControlsTestUtils
(Qt.test.controls) to allow reading and writing environment
variables from QML.
Fixes: QTBUG-72208
Pick-to: 6.8 6.9 6.10
Change-Id: Idb4ab26568d8f1eddd5ab4cebe691e38173d02a9
Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compiler.cpp')
0 files changed, 0 insertions, 0 deletions