Put code related to timezone functionality under QT_CONFIG(timezone)
Pick-to: 6.4 6.3 Change-Id: I0d1573dbb4ae4f9740fc19546950ae4316aa4c0c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
0250f9364f
commit
6a3509baa2
@ -19,7 +19,9 @@
|
||||
#include <QtSql/private/qsqlcachedresult_p.h>
|
||||
#include <QtSql/private/qsqldriver_p.h>
|
||||
#include <qstringlist.h>
|
||||
#if QT_CONFIG(timezone)
|
||||
#include <qtimezone.h>
|
||||
#endif
|
||||
#include <qvariant.h>
|
||||
#include <qvarlengtharray.h>
|
||||
|
||||
|
@ -13,7 +13,9 @@
|
||||
# include <QProcess>
|
||||
#endif
|
||||
#include <QScopedArrayPointer>
|
||||
#if QT_CONFIG(timezone)
|
||||
#include <QTimeZone>
|
||||
#endif
|
||||
|
||||
#include <private/qlocale_p.h>
|
||||
#include <private/qlocale_tools_p.h>
|
||||
|
@ -4,7 +4,9 @@
|
||||
|
||||
#include <private/qglobal_p.h> // for the icu feature test
|
||||
#include <QTest>
|
||||
#if QT_CONFIG(timezone)
|
||||
#include <QTimeZone>
|
||||
#endif
|
||||
#include <qdatetime.h>
|
||||
#include <qlocale.h>
|
||||
#include <QMap>
|
||||
|
@ -2507,11 +2507,13 @@ void tst_QDateTime::fromStringDateFormat_data()
|
||||
// 24:00:00 Should be next day according to ISO 8601 section 4.2.3.
|
||||
QTest::newRow("ISO 24:00") << QString::fromLatin1("2012-06-04T24:00:00")
|
||||
<< Qt::ISODate << QDateTime(QDate(2012, 6, 5), QTime(0, 0), Qt::LocalTime);
|
||||
#if QT_CONFIG(timezone)
|
||||
QTest::newRow("ISO 24:00 in DST") // Only special if TZ=America/Sao_Paulo
|
||||
<< QString::fromLatin1("2008-10-18T24:00") << Qt::ISODate
|
||||
<< QDateTime(QDate(2008, 10, 19),
|
||||
QTime(QTimeZone::systemTimeZoneId() == "America/Sao_Paulo" ? 1 : 0, 0),
|
||||
Qt::LocalTime);
|
||||
#endif
|
||||
QTest::newRow("ISO 24:00 end of month") << QString::fromLatin1("2012-06-30T24:00:00")
|
||||
<< Qt::ISODate << QDateTime(QDate(2012, 7, 1), QTime(0, 0), Qt::LocalTime);
|
||||
QTest::newRow("ISO 24:00 end of year") << QString::fromLatin1("2012-12-31T24:00:00")
|
||||
|
Loading…
x
Reference in New Issue
Block a user