mirror of https://github.com/nymea/nymea.git
update datetime
parent
98bbd65922
commit
c0fcf6bea2
|
|
@ -121,7 +121,6 @@ DevicePluginDateTime::DevicePluginDateTime() :
|
|||
m_currentDateTime = QDateTime(QDate::currentDate(), QTime::currentTime(), m_timeZone);
|
||||
|
||||
connect(m_timer, &QTimer::timeout, this, &DevicePluginDateTime::onSecondChanged);
|
||||
connect(this, &DevicePluginDateTime::configValueChanged, this, &DevicePluginDateTime::onConfigValueChanged);
|
||||
}
|
||||
|
||||
DeviceManager::HardwareResources DevicePluginDateTime::requiredHardware() const
|
||||
|
|
@ -129,21 +128,6 @@ DeviceManager::HardwareResources DevicePluginDateTime::requiredHardware() const
|
|||
return DeviceManager::HardwareResourceNetworkManager;
|
||||
}
|
||||
|
||||
//QList<ParamType> DevicePluginDateTime::configurationDescription() const
|
||||
//{
|
||||
// QList<ParamType> params;
|
||||
// ParamType timezoneParamType("timezone", QVariant::String, "Europe/Vienna");
|
||||
|
||||
// QList<QVariant> allowedValues;
|
||||
// foreach (QByteArray timeZone, QTimeZone::availableTimeZoneIds()) {
|
||||
// allowedValues.append(timeZone);
|
||||
// }
|
||||
// timezoneParamType.setAllowedValues(allowedValues);
|
||||
|
||||
// params.append(timezoneParamType);
|
||||
// return params;
|
||||
//}
|
||||
|
||||
DeviceManager::DeviceSetupStatus DevicePluginDateTime::setupDevice(Device *device)
|
||||
{
|
||||
// check timezone
|
||||
|
|
@ -332,14 +316,14 @@ void DevicePluginDateTime::processGeoLocationData(const QByteArray &data)
|
|||
qCWarning(dcDateTime) << "failed to request geo location:" << response.value("status");
|
||||
}
|
||||
|
||||
// check timezone
|
||||
QString timeZone = response.value("timezone").toString();
|
||||
if (QString(m_timeZone.id()) != timeZone) {
|
||||
qCWarning(dcDateTime) << "error: configured timezone does not match the discovered timezone";
|
||||
qCWarning(dcDateTime) << " configured:" << m_timeZone.id();
|
||||
qCWarning(dcDateTime) << " discovered:" << timeZone;
|
||||
return;
|
||||
}
|
||||
// // check timezone
|
||||
// QString timeZone = response.value("timezone").toString();
|
||||
// if (QString(m_timeZone.id()) != timeZone) {
|
||||
// qCWarning(dcDateTime) << "error: configured timezone does not match the discovered timezone";
|
||||
// qCWarning(dcDateTime) << " configured:" << m_timeZone.id();
|
||||
// qCWarning(dcDateTime) << " discovered:" << timeZone;
|
||||
// return;
|
||||
// }
|
||||
|
||||
qCDebug(dcDateTime) << "---------------------------------------------";
|
||||
qCDebug(dcDateTime) << "autodetected location for" << response.value("query").toString();
|
||||
|
|
|
|||
Loading…
Reference in New Issue