aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllocale.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-19 01:00:06 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-19 01:00:06 +0100
commit440d699f83ab2a9676744755fd8d42c1cfeb8064 (patch)
treebb488739927eb0541b9ec668bed774a6d214e894 /src/qml/qml/qqmllocale.cpp
parent872dc18e653b50c878699a78ca7cb9399cb47b62 (diff)
parentd89dde522a67f6fb01f9879f45871efed5e35793 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/qml/qml/qqmllocale.cpp')
-rw-r--r--src/qml/qml/qqmllocale.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp
index 1743410776..bc227ad713 100644
--- a/src/qml/qml/qqmllocale.cpp
+++ b/src/qml/qml/qqmllocale.cpp
@@ -314,7 +314,7 @@ ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::Function
QLocale locale;
QString dateString = s->toQString();
QDate date = locale.toDate(dateString);
- RETURN_RESULT(engine->newDateObject(QDateTime(date)));
+ RETURN_RESULT(engine->newDateObject(date.startOfDay()));
}
}
@@ -341,7 +341,7 @@ ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::Function
dt = r->d()->locale->toDate(dateString, enumFormat);
}
- RETURN_RESULT(engine->newDateObject(QDateTime(dt)));
+ RETURN_RESULT(engine->newDateObject(dt.startOfDay()));
}
ReturnedValue QQmlDateExtension::method_timeZoneUpdated(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *, int argc)