aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 98d930eece..ed64493d9a 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -719,6 +719,11 @@ QString DateObject::dateTimeToString(const QDateTime &dateTime, ExecutionEngine
return ToString(TimeClip(dateTime.toMSecsSinceEpoch()), engine->localTZA);
}
+QDateTime DateObject::stringToDateTime(const QString &string, ExecutionEngine *engine)
+{
+ return ToDateTime(ParseString(string, engine->localTZA), QTimeZone::LocalTime);
+}
+
QDate DateObject::dateTimeToDate(const QDateTime &dateTime)
{
// If the Date object was parse()d from a string with no time part