Show if Daylight Saving Time is enabled.
This commit is contained in:
parent
99b2ed9d58
commit
7278cba9c0
|
@ -125,7 +125,7 @@ void ConsoleReader::listSockets()
|
||||||
for (std::vector<Socket*>::const_iterator i = sockets->begin() ; i != sockets->end(); ++i) {
|
for (std::vector<Socket*>::const_iterator i = sockets->begin() ; i != sockets->end(); ++i) {
|
||||||
std::cout << "_____________________________________________________________________________\n" << std::endl;
|
std::cout << "_____________________________________________________________________________\n" << std::endl;
|
||||||
std::cout << "IP Address: " << (*i)->ip.toString().remove("::ffff:").toStdString() << "\t MAC Address: " << (*i)->mac.toHex().toStdString() << "\t Power: " << ((*i)->powered ? "On" : "Off") << std::endl;
|
std::cout << "IP Address: " << (*i)->ip.toString().remove("::ffff:").toStdString() << "\t MAC Address: " << (*i)->mac.toHex().toStdString() << "\t Power: " << ((*i)->powered ? "On" : "Off") << std::endl;
|
||||||
std::cout << "Socket Name: " << (*i)->socketName.toStdString() << "\t Remote Password: " << (*i)->remotePassword.toStdString() << "\t Timezone: " << +(*i)->timezone << std::endl;
|
std::cout << "Socket Name: " << (*i)->socketName.toStdString() << "\t Remote Password: " << (*i)->remotePassword.toStdString() << "\t Timezone: " << +(*i)->timezone << ((*i)->dst ? " (DST)" : "") << std::endl;
|
||||||
std::cout << "Off timer: " << (*i)->offTime << " " << ((*i)->offTimerEnabled ? "(enabled)" : "(disabled)") << "\t\t Time: " << (*i)->socketDateTime.toString().toStdString() << std::endl;
|
std::cout << "Off timer: " << (*i)->offTime << " " << ((*i)->offTimerEnabled ? "(enabled)" : "(disabled)") << "\t\t Time: " << (*i)->socketDateTime.toString().toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
std::cout << "_____________________________________________________________________________\n" << std::endl;
|
std::cout << "_____________________________________________________________________________\n" << std::endl;
|
||||||
|
|
|
@ -265,6 +265,7 @@ bool Socket::parseReply(QByteArray reply)
|
||||||
localNetMask = reply.mid(index, 4);
|
localNetMask = reply.mid(index, 4);
|
||||||
index += 4;
|
index += 4;
|
||||||
DST_TimezoneOffset = reply.mid(index, 1);
|
DST_TimezoneOffset = reply.mid(index, 1);
|
||||||
|
dst = DST_TimezoneOffset == QByteArray::fromHex("00") || DST_TimezoneOffset == QByteArray::fromHex("02");
|
||||||
++index;
|
++index;
|
||||||
discoverable = reply.mid(index, 1);
|
discoverable = reply.mid(index, 1);
|
||||||
++index;
|
++index;
|
||||||
|
|
Loading…
Reference in New Issue