Skip to content

Commit

Permalink
Merge pull request pkuehnel#797 from pkuehnel/fix/LAtesTimeToReachSoC…
Browse files Browse the repository at this point in the history
…Autoupdate

fix(LatestTimeToReachSocUpdateService): only set date to yesterday if…
  • Loading branch information
pkuehnel authored May 1, 2023
2 parents 7017315 + e252dca commit 1867118
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ internal void UpdateCarConfiguration(CarConfiguration carConfiguration)
}
else
{
if (carConfiguration.LatestTimeToReachSoC < dateTimeOffSetNow.ToLocalTime().DateTime)
var localDateTime = dateTimeOffSetNow.ToLocalTime().DateTime;
if (carConfiguration.LatestTimeToReachSoC.Date < localDateTime.Date)
{
carConfiguration.LatestTimeToReachSoC = _dateTimeProvider.Now().Date.AddDays(-1) +
carConfiguration.LatestTimeToReachSoC.TimeOfDay;
Expand Down

0 comments on commit 1867118

Please sign in to comment.