From c174d7f594c8c7d971ffd3452726aa198647dfcb Mon Sep 17 00:00:00 2001
From: mattbk
Date: Wed, 6 Sep 2023 16:57:57 -0500
Subject: [PATCH] Make date formats match and stop passing an extra variable.
---
vulpes/platformio.ini | 4 ++--
vulpes/src/main.cpp | 13 +++++++++----
2 files changed, 11 insertions(+), 6 deletions(-)
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:
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");
}