From ace2fce3a223122214c3b071809c3b34d12c27a5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 25 Oct 2025 11:23:23 -0700 Subject: [PATCH] [core] Simplify ESPTime::strftime() and save 20 bytes flash --- esphome/core/time.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/core/time.h b/esphome/core/time.h index 13a0127156..080a0793e0 100644 --- a/esphome/core/time.h +++ b/esphome/core/time.h @@ -46,6 +46,9 @@ struct ESPTime { /** Convert this ESPTime struct to a string as specified by the format argument. * @see https://en.cppreference.com/w/c/chrono/strftime * + * @warning This method returns a dynamically allocated string which can cause heap fragmentation with some + * microcontrollers. + * * @warning This method can return "ERROR" when the underlying strftime() call fails or when the * output exceeds 128 bytes. */