Skip to content

Commit 8ab65a0

Browse files
committed
Adjust in leap year logic
1 parent 5b5c317 commit 8ab65a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NTPClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ NTPClient::FullDateComponents NTPClient::calculateFullDateComponents() const {
174174

175175
while (days > 365) {
176176
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
177-
if (days > 366) {
177+
if (days >= 366) {
178178
days -= 366;
179179
year++;
180180
} else {

0 commit comments

Comments
 (0)