Fix an inaccurate comment and update a test case

The offset fields for tst_QTimeZone::specificTransition() had a
comment claiming they are in minutes; they are in fact in seconds, so
fix that. At the same time, Moscow hasn't had a time-zone change since
2017, so the end-date for one of the test intervals can be nudged a
little closer to the present without harm.

Change-Id: I66822cb758f7e00d6added801466a6745be3e31a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Edward Welbourne 2022-01-28 15:28:14 +01:00 committed by Marc Mutz
parent 15bcf03f3e
commit 0828014b44

View File

@ -527,7 +527,7 @@ void tst_QTimeZone::specificTransition_data()
QTest::addColumn<QDate>("stop");
QTest::addColumn<int>("count");
QTest::addColumn<QDateTime>("atUtc");
// In minutes:
// In seconds:
QTest::addColumn<int>("offset");
QTest::addColumn<int>("stdoff");
QTest::addColumn<int>("dstoff");
@ -544,7 +544,7 @@ void tst_QTimeZone::specificTransition_data()
{
QTest::newRow("Moscow/2014") // From original bug-report
<< QByteArray("Europe/Moscow")
<< QDate(2011, 4, 1) << QDate(2017, 12,31) << 1
<< QDate(2011, 4, 1) << QDate(2021, 12, 31) << 1
<< QDateTime(QDate(2014, 10, 26), QTime(2, 0, 0),
Qt::OffsetFromUTC, 4 * 3600).toUTC()
<< 3 * 3600 << 3 * 3600 << 0;