Skip to content

Commit

Permalink
clear dstoffset when DSTOffsetRequired is true (#28654)
Browse files Browse the repository at this point in the history
Co-authored-by: C Freeman <cecille@google.com>
  • Loading branch information
2 people authored and pull[bot] committed Oct 5, 2023
1 parent ce4aad0 commit 1236064
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -925,19 +925,24 @@ bool emberAfTimeSynchronizationClusterSetTimeZoneCallback(
}
else
{
TimeState dstState = TimeSynchronizationServer::Instance().UpdateDSTOffsetState();
TimeSynchronizationServer::Instance().ClearDSTOffset();
if (dstState == TimeState::kActive || dstState == TimeState::kChanged)
{
emitDSTStatusEvent(commandPath.mEndpointId, false);
}
response.DSTOffsetRequired = true;
}
}
else
{
response.DSTOffsetRequired = true;
}

if (response.DSTOffsetRequired)
{
TimeState dstState = TimeSynchronizationServer::Instance().UpdateDSTOffsetState();
TimeSynchronizationServer::Instance().ClearDSTOffset();
if (dstState == TimeState::kActive || dstState == TimeState::kChanged)
{
emitDSTStatusEvent(commandPath.mEndpointId, false);
}
}

commandObj->AddResponse(commandPath, response);
return true;
}
Expand Down

0 comments on commit 1236064

Please sign in to comment.