summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 13ec024924..282aed595b 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -51,7 +51,9 @@
#include <qstringlist.h>
#include <qvector.h>
#include <qdebug.h>
+#if QT_CONFIG(timezone)
#include <QTimeZone>
+#endif
#if defined Q_OS_WIN
# include <qt_windows.h>
@@ -430,8 +432,10 @@ static QString timespecToString(const QDateTime &dateTime)
return QStringLiteral("Z");
case Qt::OffsetFromUTC:
return secondsToOffset(dateTime.offsetFromUtc());
+#if QT_CONFIG(timezone)
case Qt::TimeZone:
return secondsToOffset(dateTime.timeZone().offsetFromUtc(dateTime));
+#endif
default:
return QString();
}