From 654403ca3d1b3ae01552b02495b6cc744706a160 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sun, 15 Oct 2023 12:53:43 +0200 Subject: [PATCH] shower time with timezone --- src/shower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shower.cpp b/src/shower.cpp index 1d91b9a42..ff7501484 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -107,8 +107,8 @@ void Shower::loop() { time_t now = time(nullptr); if (now > 1576800000) { // year 2020 tm * tm_ = localtime(&now); - char dt[20]; - strftime(dt, sizeof(dt), "%T", tm_); + char dt[25]; + strftime(dt, sizeof(dt), "%FT%T%z", tm_); doc["time"] = dt; } Mqtt::queue_publish("shower_data", doc.as());