Fixup 4d51a05c: QTimeZone is available since Qt 6.5

This commit is contained in:
Jean-Marc Lasgouttes 2024-10-21 17:37:43 +02:00
parent 7cda9a1d9f
commit 05f50a0544

View File

@ -19,7 +19,7 @@
#include <QDateTime> #include <QDateTime>
#include <QLocale> #include <QLocale>
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
#include <QTimeZone> #include <QTimeZone>
#endif #endif
@ -72,7 +72,7 @@ time_t from_asctime_utc(string t)
<< "´ (invalid format)"); << "´ (invalid format)");
return static_cast<time_t>(-1); return static_cast<time_t>(-1);
} }
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
loc_dt.setTimeZone(QTimeZone(QTimeZone::UTC)); loc_dt.setTimeZone(QTimeZone(QTimeZone::UTC));
#else #else
loc_dt.setTimeSpec(Qt::UTC); loc_dt.setTimeSpec(Qt::UTC);