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

fix local time timestamp calculation (#7807)

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel Sieb
2024-11-25 14:15:01 -10:00
committed by GitHub
parent f4766ab74f
commit a70cee1dc1
3 changed files with 21 additions and 21 deletions

View File

@@ -9,8 +9,6 @@ namespace esphome {
template<typename T> bool increment_time_value(T &current, uint16_t begin, uint16_t end);
bool is_leap_year(uint32_t year);
uint8_t days_in_month(uint8_t month, uint16_t year);
/// A more user-friendly version of struct tm from time.h
@@ -100,7 +98,7 @@ struct ESPTime {
void recalc_timestamp_utc(bool use_day_of_year = true);
/// Recalculate the timestamp field from the other fields of this ESPTime instance assuming local fields.
void recalc_timestamp_local(bool use_day_of_year = true);
void recalc_timestamp_local();
/// Convert this ESPTime instance back to a tm struct.
struct tm to_c_tm();