on xenial help sign in
Olsen TZ fixes (missing Greenland + a typo)
dede4d9Lukáš Tinkl
plugins/Wizard/timezonemodel.cpp+4−4
@@ -201,7 +201,7 @@ static QByteArrayList olsenTimezones = {
201 "America/Whitehorse",
201 "America/Whitehorse",
202 "America/Winnipeg",
202 "America/Winnipeg",
203 "America/Yellowknife",
203 "America/Yellowknife",
204− "Ameriica/Swift_Current",
204+ "America/Swift_Current",
205 "Arctic/Longyearbyen",
205 "Arctic/Longyearbyen",
206 "Asia/Aden",
206 "Asia/Aden",
207 "Asia/Almaty",
207 "Asia/Almaty",
@@ -403,7 +403,8 @@ static QByteArrayList olsenTimezones = {
403 "Pacific/Tongatapu",
403 "Pacific/Tongatapu",
404 "Pacific/Truk",
404 "Pacific/Truk",
405 "Pacific/Wake",
405 "Pacific/Wake",
406− "Pacific/Wallis"
406+ "Pacific/Wallis",
407+ "America/Godthab"
407};
408};
408
409
409TimeZoneLocationModel::TimeZoneLocationModel(QObject *parent):
410TimeZoneLocationModel::TimeZoneLocationModel(QObject *parent):
@@ -522,8 +523,8 @@ QJsonArray TimeZoneLocationModel::timezoneAndOffsetAtMapPoint(int x, int y, cons
522 qWarning() << "Clicked the water!";
523 qWarning() << "Clicked the water!";
523 return QJsonArray();
524 return QJsonArray();
524 }
525 }
525− const int zoneIndex = ((red & 248) << 1) + ((green >> 4) & 15);
526
526
527+ const int zoneIndex = ((red & 248) << 1) + ((green >> 4) & 15);
527 qDebug() << "Zone index:" << zoneIndex;
528 qDebug() << "Zone index:" << zoneIndex;
528 if (zoneIndex >= 0 && zoneIndex < olsenTimezones.count()) {
529 if (zoneIndex >= 0 && zoneIndex < olsenTimezones.count()) {
529 const QByteArray tzId = olsenTimezones.at(zoneIndex);
530 const QByteArray tzId = olsenTimezones.at(zoneIndex);
@@ -533,7 +534,6 @@ QJsonArray TimeZoneLocationModel::timezoneAndOffsetAtMapPoint(int x, int y, cons
533 QJsonArray result;
534 QJsonArray result;
534 result.append(qUtf8Printable(tzId));
535 result.append(qUtf8Printable(tzId));
535 result.append(static_cast<double>(tz.standardTimeOffset(QDateTime::currentDateTime())) / 3600);
536 result.append(static_cast<double>(tz.standardTimeOffset(QDateTime::currentDateTime())) / 3600);
536− qDebug() << "!!! timezone and offset" << result.at(0) << result.at(1);
537 return result;
537 return result;
538 }
538 }
539 qWarning() << Q_FUNC_INFO << "Invalid timezone" << tzId;
539 qWarning() << Q_FUNC_INFO << "Invalid timezone" << tzId;