From 0c887e8cd754e7860a1e7f24c67f36b121f16819 Mon Sep 17 00:00:00 2001 From: German Martin Date: Mon, 1 May 2017 09:07:44 +0200 Subject: [PATCH] This was not uptime but first time sync So, there is no need to substract anything --- src/ESPNTPClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ESPNTPClient.cpp b/src/ESPNTPClient.cpp index e9820ba..e83800a 100644 --- a/src/ESPNTPClient.cpp +++ b/src/ESPNTPClient.cpp @@ -130,7 +130,7 @@ time_t NTPClient::getTime() getFirstSync(); _lastSyncd = secsSince1970; if (!_firstSync) { // first sync is not set - _firstSync = secsSince1970 - getUptime(); + _firstSync = secsSince1970; DEBUGLOG("First sync! %s\r\n", getTimeDateString(getFirstSync()).c_str()); } DEBUGLOG("Succeccful NTP sync at %s\r\n", getTimeDateString(getLastNTPSync()).c_str());