diff --git a/libraries/WiFiS3/src/WiFi.cpp b/libraries/WiFiS3/src/WiFi.cpp index c6acbc15..0717f673 100644 --- a/libraries/WiFiS3/src/WiFi.cpp +++ b/libraries/WiFiS3/src/WiFi.cpp @@ -551,11 +551,10 @@ unsigned long CWifi::getTime() { /* ----------------------------------------------*/ modem.begin(); string res = ""; - unsigned long tt = 0; if(modem.write(string(PROMPT(_GETTIME)),res,"%s\r\n", CMD_WRITE(_GETTIME))) { - tt = strtol(res.c_str(), NULL, 10); + return strtol(res.c_str(), NULL, 10); } - return tt; + return 0; } void CWifi::setTimeout(unsigned long timeout) {