From c60123ce979172c7aae668ed9af3670021503d12 Mon Sep 17 00:00:00 2001 From: hidaba Date: Fri, 5 May 2023 19:00:28 +0200 Subject: [PATCH] timezone added timezone in root page --- PylontechMonitoring.ino | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PylontechMonitoring.ino b/PylontechMonitoring.ino index 12e581c..8494895 100644 --- a/PylontechMonitoring.ino +++ b/PylontechMonitoring.ino @@ -18,10 +18,11 @@ // Set offset time in seconds to adjust for your timezone, for example: // GMT +1 = 3600 +// GMT +1 = 7200 // GMT +8 = 28800 // GMT -1 = -3600 // GMT 0 = 0 -#define GMT 3600 +#define GMT 7200 //NOTE 1: if you want to change what is pushed via MQTT - edit function: pushBatteryDataToMqtt. //NOTE 2: MQTT_TOPIC_ROOT is where battery will push MQTT topics. For example "soc" will be pushed to: "home/grid_battery/soc" @@ -286,9 +287,9 @@ void handleRoot() { int currentMonth = ptm->tm_mon+1; static char szTmp[9500] = ""; - - snprintf(szTmp, sizeof(szTmp)-1, "Pylontech Battery
Time GMT: %s (%s)
Uptime: %02d:%02d:%02d.%02d

free heap: %u
Wifi RSSI: %d
Wifi SSID: %s", - formattedTime, "GMT", + long timezone= GMT / 3600; + snprintf(szTmp, sizeof(szTmp)-1, "Pylontech Battery
Time GMT: %s (%s %d)
Uptime: %02d:%02d:%02d.%02d

free heap: %u
Wifi RSSI: %d
Wifi SSID: %s", + formattedTime, "GMT ", timezone, (int)days, (int)hours, (int)minutes, (int)val, ESP.getFreeHeap(), WiFi.RSSI(), WiFi.SSID().c_str());