Zigbee fix timezone when device reads LocalTime attribute ()

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
CHANGELOG.md
tasmota/tasmota_xdrv_driver

View File

@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- ESP32 shutter frequency (#19717)
- ModbusBridge write memory leak (#19758)
- Zigbee fix timezone when device reads LocalTime attribute
### Removed
- 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);
break;
case 0x000A0002: // TimeZone
attr.setUInt(Settings->toffset[0] * 60);
attr.setUInt(Rtc.time_timezone * 60);
break;
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;
}
if (!attr.isNone()) {