We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f28d84b commit b934478Copy full SHA for b934478
src/WiFi.cpp
@@ -916,6 +916,8 @@ uint32_t WiFiClass::getTime()
916
m2m_wifi_handle_events(NULL);
917
}
918
919
+ time_t t = -1;
920
+
921
if (_resolve == 0) {
922
struct tm tm;
923
@@ -927,12 +929,16 @@ uint32_t WiFiClass::getTime()
927
929
tm.tm_sec = systemTime.u8Second;
928
930
tm.tm_isdst = -1;
931
- _resolve = mktime(&tm);
- } else {
932
- _resolve = (uint32_t)-1;
+ t = mktime(&tm);
933
934
935
- return _resolve;
+ _resolve = 0;
936
937
+ if (t == -1) {
938
+ t = 0;
939
+ }
940
941
+ return t;
942
943
944
WiFiClass WiFi;
0 commit comments