1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 08:41:59 +00:00
This commit is contained in:
J. Nick Koston
2026-01-29 21:54:40 -06:00
parent c1971955a3
commit a1cdfe71de
2 changed files with 0 additions and 13 deletions

View File

@@ -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;

View File

@@ -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 {