1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 23:21:54 +00:00

[core] Simplify ESPTime::strftime() and save 20 bytes flash

This commit is contained in:
J. Nick Koston
2025-10-25 11:23:23 -07:00
parent 960c80b202
commit ace2fce3a2

View File

@@ -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.
*/