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>
bb10
Edward Welbourne 2017-10-31 11:21:18 +01:00
parent 8e860f836b
commit 90a78c9724
1 changed files with 2 additions and 1 deletions

View File

@ -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