[time] Fix timezone_offset() and recalc_timestamp_local() always using UTC fallback

time.h was missing #include "esphome/core/defines.h", so USE_TIME_TIMEZONE
was never defined when compiling time.cpp. Both functions always took the
#else path, returning 0 offset and treating local time as UTC.
This commit is contained in:
J. Nick Koston
2026-03-19 18:47:45 -10:00
parent 02ada93ea5
commit 197dd332b1
+2
View File
@@ -1,5 +1,7 @@
#pragma once
#include "esphome/core/defines.h"
#include <cstdint>
#include <cstdlib>
#include <cstring>