diff --git a/esphome/components/time/posix_tz.cpp b/esphome/components/time/posix_tz.cpp index 178eaff191..972092fb7c 100644 --- a/esphome/components/time/posix_tz.cpp +++ b/esphome/components/time/posix_tz.cpp @@ -403,13 +403,6 @@ bool is_in_dst(time_t utc_epoch, const ParsedTimezone &tz) { } } -int32_t get_utc_offset(time_t utc_epoch, const ParsedTimezone &tz) { - if (is_in_dst(utc_epoch, tz)) { - return tz.dst_offset_seconds; - } - return tz.std_offset_seconds; -} - bool epoch_to_local_tm(time_t utc_epoch, const ParsedTimezone &tz, struct tm *out_tm) { if (!out_tm) { return false; diff --git a/esphome/components/time/posix_tz.h b/esphome/components/time/posix_tz.h index 70f2a84851..ed7a1d8120 100644 --- a/esphome/components/time/posix_tz.h +++ b/esphome/components/time/posix_tz.h @@ -66,12 +66,6 @@ bool is_in_dst(time_t utc_epoch, const ParsedTimezone &tz); /// @return true on success bool epoch_to_local_tm(time_t utc_epoch, const ParsedTimezone &tz, struct tm *out_tm); -/// Get the current offset from UTC in seconds for a given epoch. -/// @param utc_epoch Unix timestamp in UTC -/// @param tz The parsed timezone -/// @return Offset in seconds (positive = behind UTC, negative = ahead) -int32_t get_utc_offset(time_t utc_epoch, const ParsedTimezone &tz); - // Internal helper functions exposed for testing namespace internal {