--- a/src/eric7/MicroPython/Devices/DeviceBase.py Thu Mar 09 16:59:39 2023 +0100 +++ b/src/eric7/MicroPython/Devices/DeviceBase.py Fri Mar 10 18:04:06 2023 +0100 @@ -123,6 +123,7 @@ self._deviceData["wifi"], self._deviceData["wifi_type"] = self.hasWifi() self._deviceData["bluetooth"] = self.hasBluetooth() self._deviceData["ethernet"] = self.hasEthernet() + self._deviceData["ntp"] = self.hasNetworkTime() def getDeviceType(self): """ @@ -1524,6 +1525,37 @@ return {}, "" ################################################################## + ## Methods below implement NTP related methods + ################################################################## + + def hasNetworkTime(self): + """ + Public method to check the availability of network time functions. + + @return flag indicating the availability of network time functions + @rtype bool + """ + return False + + def setNetworkTime(self, server="0.pool.ntp.org", tzOffset=0, timeout=10): + """ + Public method to set the time to the network time retrieved from an + NTP server. + + @param server name of the NTP server to get the network time from + (defaults to "0.pool.ntp.org") + @type str (optional) + @param tzOffset offset with respect to UTC (defaults to 0) + @type int (optional) + @param timeout maximum time to wait for a server response in seconds + (defaults to 10) + @type int + @return tuple containing a flag indicating success and an error string + @rtype tuple of (bool, str) + """ + return False, "" + + ################################################################## ## Methods below implement some utility methods ##################################################################