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 <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 16, 2023
1 parent 926c0b2 commit 3394911
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 3394911

Please sign in to comment.