diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-10-31 11:21:18 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-11-06 09:54:20 +0000 |
commit | 90a78c9724c8b52b3675634ac6f07f3a005fc841 (patch) | |
tree | 497d032529cc8fc2d717654367d422dfbb69857e | |
parent | 8e860f836bce8fd70a90798f8817a1410d8d8414 (diff) |
Fix typo in tst_QTimeZone::testEpochTranPrivate()
The milli-seconds since epoch value for an invalid transition is,
of course, invalidMSecs(), not invalidSeconds().
Added a comment while I was at it, explaining why we expect a
transition before the epoch, if such transitions are supported.
Change-Id: I0f376f9d69c0e6e79a309dc011943baa41175135
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp index 9f22c3d51d..6b103d355a 100644 --- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp @@ -1177,7 +1177,8 @@ void tst_QTimeZone::testEpochTranPrivate(const QTimeZonePrivate &tzp) // Pre-epoch time-zones might not be supported at all: tran = tzp.nextTransition(QDateTime(QDate(1601, 1, 1), QTime(0, 0), Qt::UTC).toMSecsSinceEpoch()); - if (tran.atMSecsSinceEpoch != QTimeZonePrivate::invalidSeconds() + if (tran.atMSecsSinceEpoch != QTimeZonePrivate::invalidMSecs() + // Toronto *did* have a transition before 1970 (DST since 1918): && tran.atMSecsSinceEpoch < 0) { // ... but, if they are, we should be able to search back to them: tran = tzp.previousTransition(0); // i.e. last before epoch |