According to ble specification [1] and based on my test with iOS, the cts_c library seems to have bugs on a process decoding adjust reason data.
Here is a simple diffs (line 168-171 on components/ble/ble_services/ble_cts_c/ble_cts_c.c
).
// Reason for updating the time.
- p_time->adjust_reason.change_of_daylight_savings_time = (p_data[index] >> 0) & 0x01;
- p_time->adjust_reason.change_of_time_zone = (p_data[index] >> 1) & 0x01;
- p_time->adjust_reason.external_reference_time_update = (p_data[index] >> 2) & 0x01;
- p_time->adjust_reason.manual_time_update = (p_data[index] >> 3) & 0x01;
+ p_time->adjust_reason.manual_time_update = (p_data[index] >> 0) & 0x01;
+ p_time->adjust_reason.external_reference_time_update = (p_data[index] >> 1) & 0x01;
+ p_time->adjust_reason.change_of_time_zone = (p_data[index] >> 2) & 0x01;
+ p_time->adjust_reason.change_of_daylight_savings_time = (p_data[index] >> 3) & 0x01;