summaryrefslogtreecommitdiff
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 1a81a7e..53a0cd1 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -3147,7 +3147,7 @@ JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const
result = newDate(exec, *reinterpret_cast<const QDateTime *>(ptr));
break;
case QMetaType::QDate:
- result = newDate(exec, QDateTime(*reinterpret_cast<const QDate *>(ptr)));
+ result = newDate(exec, reinterpret_cast<const QDate *>(ptr)->startOfDay());
break;
#ifndef QT_NO_QOBJECT
case QMetaType::QObjectStar: