Fix build without features.timezone
Change-Id: I3f8421103afa61baf415636b4dc8cf93fb477bcc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
f72777b969
commit
8f7dcba204
@ -44,7 +44,9 @@
|
||||
#include "qset.h"
|
||||
#include "qlocale.h"
|
||||
#include "qdatetime.h"
|
||||
#if QT_CONFIG(timezone)
|
||||
#include "qtimezone.h"
|
||||
#endif
|
||||
#include "qregexp.h"
|
||||
#include "qdebug.h"
|
||||
|
||||
|
@ -55,7 +55,9 @@
|
||||
#include <qcache.h>
|
||||
#include <qregularexpression.h>
|
||||
#endif
|
||||
#if QT_CONFIG(timezone)
|
||||
#include <QTimeZone>
|
||||
#endif
|
||||
#include <QScopedValueRollback>
|
||||
|
||||
#if defined Q_OS_WIN
|
||||
@ -438,8 +440,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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user