From 7736044acb28bf8c77aaca80e608b59404457da3 Mon Sep 17 00:00:00 2001 From: -cr <105788188+DE-cr@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:46:18 +0100 Subject: [PATCH 1/2] /C: include current date/time for all systems --- BSB_LAN/BSB_LAN.ino | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/BSB_LAN/BSB_LAN.ino b/BSB_LAN/BSB_LAN.ino index 3d4d3a87..c1fb7b7d 100644 --- a/BSB_LAN/BSB_LAN.ino +++ b/BSB_LAN/BSB_LAN.ino @@ -2159,12 +2159,8 @@ void generateConfigPage(void) { unsigned long h = m / 60; unsigned d = h / 24; printFmtToWebClient(PSTR(MENU_TEXT_UPT ": %lu\r\nms = %ud+%02lu:%02lu:%02lu.%03lu
\r\n"), ms, d, h%24, m%60, s%60, ms%1000); -#if defined(ESP32) - struct tm timeinfo; - if(getLocalTime(&timeinfo)){ - printFmtToWebClient(PSTR(ENUM_CAT_00_TEXT ": %02d.%02d.%02d %02d:%02d:%02d
\r\n"), timeinfo.tm_mday, timeinfo.tm_mon+1, timeinfo.tm_year-100, timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec); - } -#endif + char tmp_date[20]; + printFmtToWebClient(PSTR(ENUM_CAT_00_TEXT ": %s
\r\n"), GetDateTime(tmp_date)); #ifndef WEBCONFIG printlnToWebClient(PSTR(MENU_TEXT_BUS ": ")); int bustype = bus->getBusType(); From ff1772374b873c96814568a51c485034d79c1157 Mon Sep 17 00:00:00 2001 From: -cr <105788188+DE-cr@users.noreply.github.com> Date: Thu, 16 Nov 2023 13:01:34 +0100 Subject: [PATCH 2/2] trying to fix compile error on github system --- BSB_LAN/BSB_LAN.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/BSB_LAN/BSB_LAN.ino b/BSB_LAN/BSB_LAN.ino index c1fb7b7d..cb2c6a01 100644 --- a/BSB_LAN/BSB_LAN.ino +++ b/BSB_LAN/BSB_LAN.ino @@ -2159,6 +2159,7 @@ void generateConfigPage(void) { unsigned long h = m / 60; unsigned d = h / 24; printFmtToWebClient(PSTR(MENU_TEXT_UPT ": %lu\r\nms = %ud+%02lu:%02lu:%02lu.%03lu
\r\n"), ms, d, h%24, m%60, s%60, ms%1000); + char *GetDateTime(char *date); // forward declaration, to avoid moving that function before this one here char tmp_date[20]; printFmtToWebClient(PSTR(ENUM_CAT_00_TEXT ": %s
\r\n"), GetDateTime(tmp_date)); #ifndef WEBCONFIG