mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
time: Make std::string version of strftime() avoid runaway memory allocations (#5348)
This commit is contained in:
@@ -45,6 +45,10 @@ struct ESPTime {
|
||||
*
|
||||
* @warning This method uses dynamically allocated strings which can cause heap fragmentation with some
|
||||
* microcontrollers.
|
||||
*
|
||||
* @warning This method can return "ERROR" when the underlying strftime() call fails, e.g. when the
|
||||
* format string contains unsupported specifiers or when the format string doesn't produce any
|
||||
* output.
|
||||
*/
|
||||
std::string strftime(const std::string &format);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user