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 Feb 1, 2024
1 parent b744836 commit 81aaff7
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 81aaff7

Please sign in to comment.