Skip to content

Commit 3954d2b

Browse files
authored
Merge pull request #126 from sandeepmistry/get-time-start-fix
Make WiFi.getTime() return 0 if WINC1500 hasn't synced time
2 parents 8ccf0b1 + 825dac1 commit 3954d2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WiFi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ uint32_t WiFiClass::getTime()
988988

989989
time_t t = -1;
990990

991-
if (_resolve == 0) {
991+
if (_resolve == 0 && systemTime.u16Year > 0) {
992992
struct tm tm;
993993

994994
tm.tm_year = systemTime.u16Year - 1900;

0 commit comments

Comments
 (0)