Skip to content

Commit 7e55c24

Browse files
committed
Correct WiFi.getTime() return value off by one day
tm.tm_mday expects a range of 1 - 31, but the WINC uses 0 - 30 for u8Day
1 parent 1ee247c commit 7e55c24

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
@@ -948,7 +948,7 @@ uint32_t WiFiClass::getTime()
948948

949949
tm.tm_year = systemTime.u16Year - 1900;
950950
tm.tm_mon = systemTime.u8Month - 1;
951-
tm.tm_mday = systemTime.u8Day;
951+
tm.tm_mday = systemTime.u8Day + 1;
952952
tm.tm_hour = systemTime.u8Hour;
953953
tm.tm_min = systemTime.u8Minute;
954954
tm.tm_sec = systemTime.u8Second;

0 commit comments

Comments
 (0)