diff --git a/vulpes/platformio.ini b/vulpes/platformio.ini index 1a2242f..30e769d 100644 --- a/vulpes/platformio.ini +++ b/vulpes/platformio.ini @@ -10,8 +10,8 @@ [env:esp32doit-devkit-v1] platform = espressif32 -;build_flags = -; -std=c++11 +build_flags = + -std=c++11 ; -std=gnu++11 board = esp32doit-devkit-v1 framework = arduino diff --git a/vulpes/src/main.cpp b/vulpes/src/main.cpp index b73d8cb..e1511d8 100644 --- a/vulpes/src/main.cpp +++ b/vulpes/src/main.cpp @@ -79,11 +79,14 @@ const char index_html[] PROGMEM = R"rawliteral( current_start = new Date(s * 1000); //current_start_utc = current_start.toUTCString(); document.getElementById('current-start').innerHTML = current_start.toString(); + // Show the local time + local_time_unix = new Date().toString(); //Math.floor(Date.now() / 1000) - new Date().getTimezoneOffset()*60; + document.getElementById('local-time-unix').innerHTML = local_time_unix.toString(); } -

Local time: %inputTimeUnix%

+

Local time:

@@ -105,7 +108,7 @@ const char index_html[] PROGMEM = R"rawliteral(

Program start time
- Current value: ) + Current value:

@@ -209,8 +212,10 @@ String processor(const String& var){ } else if(var == "inputFloat"){ return readFile(SPIFFS, "/inputFloat.txt"); - } else if(var == "inputTimeUnix"){ - return rtc.now().timestamp(); + // } else if(var == "inputTimeUnix"){ + // //return rtc.now().timestamp(); + // Serial.print("RTC time: "); + // Serial.println(rtc.now().unixtime()); } else if(var == "inputStartTimeUnix"){ return readFile(SPIFFS, "/inputStartTimeUnix.txt"); }