Zigbee fix timezone when device reads LocalTime attribute (#19772)

This commit is contained in:
s-hadinger 2023-10-17 09:02:14 +02:00 committed by GitHub
parent 8e9299ec97
commit 82858616f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
- ESP32 shutter frequency (#19717) - ESP32 shutter frequency (#19717)
- ModbusBridge write memory leak (#19758) - ModbusBridge write memory leak (#19758)
- Zigbee fix timezone when device reads LocalTime attribute
### Removed ### Removed
- WiFiClientSecure in favour of WiFiClientSecureLightBearSSL (#19725) - WiFiClientSecure in favour of WiFiClientSecureLightBearSSL (#19725)

View File

@ -2274,10 +2274,10 @@ void ZCLFrame::autoResponder(const uint16_t *attr_list_ids, size_t attr_len) {
attr.setUInt((Rtc.utc_time > START_VALID_TIME) ? 0x02 : 0x00); attr.setUInt((Rtc.utc_time > START_VALID_TIME) ? 0x02 : 0x00);
break; break;
case 0x000A0002: // TimeZone case 0x000A0002: // TimeZone
attr.setUInt(Settings->toffset[0] * 60); attr.setUInt(Rtc.time_timezone * 60);
break; break;
case 0x000A0007: // LocalTime // TODO take DST case 0x000A0007: // LocalTime // TODO take DST
attr.setUInt(Settings->toffset[0] * 60 + ((Rtc.utc_time > START_VALID_TIME) ? Rtc.utc_time - 946684800 : Rtc.utc_time)); attr.setUInt(Rtc.time_timezone * 60 + ((Rtc.utc_time > START_VALID_TIME) ? Rtc.utc_time - 946684800 : Rtc.utc_time));
break; break;
} }
if (!attr.isNone()) { if (!attr.isNone()) {