Skip to content

Commit

Permalink
Display current date and time only on ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Nov 16, 2023
1 parent 8d6777d commit 7c37e98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2159,10 +2159,12 @@ 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<BR>\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<BR>\r\n"), timeinfo.tm_mday, timeinfo.tm_mon+1, timeinfo.tm_year-100, timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec);
}
#endif
#ifndef WEBCONFIG
printlnToWebClient(PSTR(MENU_TEXT_BUS ": "));
int bustype = bus->getBusType();
Expand Down

0 comments on commit 7c37e98

Please sign in to comment.