mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-16 04:43:53 +00:00
Use device timezone in gui
This commit is contained in:
@@ -261,6 +261,8 @@ void AmsWebServer::sysinfoJson() {
|
||||
if(!meterId.isEmpty())
|
||||
meterId.replace(F("\\"), F("\\\\"));
|
||||
|
||||
time_t now = time(nullptr);
|
||||
|
||||
int size = snprintf_P(buf, BufferSize, SYSINFO_JSON,
|
||||
FirmwareVersion::VersionString,
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
@@ -326,7 +328,8 @@ void AmsWebServer::sysinfoJson() {
|
||||
ea->getUseLastMonth(),
|
||||
ea->getCostLastMonth(),
|
||||
ea->getProducedLastMonth(),
|
||||
ea->getIncomeLastMonth()
|
||||
ea->getIncomeLastMonth(),
|
||||
(tz->toLocal(now)-now)/3600
|
||||
);
|
||||
|
||||
stripNonAscii((uint8_t*) buf, size+1);
|
||||
|
||||
Reference in New Issue
Block a user