1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-08 14:22:21 +01:00

Replace std::regex with sscanf calls (#6468)

* Replace std::regex with sscanf calls

* Fix CI

* Use regular formatting placeholders

* Fix
This commit is contained in:
Jesse Hills
2024-04-04 13:41:41 +13:00
committed by GitHub
parent f09bfa7311
commit 0148ebcaa6
2 changed files with 37 additions and 44 deletions

View File

@@ -67,8 +67,6 @@ struct ESPTime {
this->day_of_year < 367 && this->month > 0 && this->month < 13;
}
#ifdef USE_DATETIME
/** Convert a string to ESPTime struct as specified by the format argument.
* @param time_to_parse null-terminated c string formatet like this: 2020-08-25 05:30:00.
* @param esp_time an instance of a ESPTime struct
@@ -76,8 +74,6 @@ struct ESPTime {
*/
static bool strptime(const std::string &time_to_parse, ESPTime &esp_time);
#endif
/// Convert a C tm struct instance with a C unix epoch timestamp to an ESPTime instance.
static ESPTime from_c_tm(struct tm *c_tm, time_t c_time);