Add a note to save the next reader some confusion

I was briefly confused about why an Etc/GMT+3 test was using GMT as
localtime. Fortunately I worked it out before mis-"correcting" it.

Change-Id: I7b0473c7d3974ef186e1170cf4999aca52aaaf45
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
bb10
Edward Welbourne 2021-11-24 17:34:37 +01:00
parent 6437bd240f
commit 0cad974d0d
1 changed files with 4 additions and 0 deletions

View File

@ -2905,6 +2905,10 @@ void tst_QDateTime::fromStringStringFormat_localTimeZone_data()
bool lacksRows = true;
#if QT_CONFIG(timezone)
// Note that the localTimeZone needn't match the zone used in the string and
// expected date-time; indeed, having them different is probably best.
// Both zones need to be valid; GMT always is, so is a safe one to use for
// whichever the test-case doesn't care about (if that applies to either).
QTimeZone etcGmtWithOffset("Etc/GMT+3");
if (etcGmtWithOffset.isValid()) {
lacksRows = false;