---
 src/qwsppdu.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/qwsppdu.cpp b/src/qwsppdu.cpp
index 897bac8..d636b5c 100644
--- a/src/qwsppdu.cpp
+++ b/src/qwsppdu.cpp
@@ -448,7 +448,11 @@ QDateTime QWspDateTime::fromGmtTime_t(quint32 t)
 */
 quint32 QWspDateTime::toTime_t(const QDateTime &dt)
 {
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
     QDateTime st(QDate(1970, 1, 1));
+#else
+    QDateTime st = QDate(1970, 1, 1).startOfDay();
+#endif
     return st.secsTo(dt) - timeZoneDiff();
 }

@@ -459,7 +463,11 @@ quint32 QWspDateTime::toTime_t(const QDateTime &dt)
 */
 quint32 QWspDateTime::toGmtTime_t(const QDateTime &dt)
 {
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
     QDateTime st(QDate(1970, 1, 1));
+#else
+    QDateTime st = QDate(1970, 1, 1).startOfDay();
+#endif
     return st.secsTo(dt) - 2*timeZoneDiff();
 }

--
2.29.2
_______________________________________________
ofono mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to