use the DateTime object when comparing dates in ExhcnageRateCalculator #49

Merged
bence merged 1 commits from bugfix/fix-current-exchange-rate-calculation into master 2023-05-06 13:44:10 +02:00
Showing only changes of commit b2babcf30f - Show all commits

View File

@ -41,7 +41,7 @@ class ExchangeRateCalculator
$currentExchangeRate = null; $currentExchangeRate = null;
foreach ($this->exchangeRates[$currency->getId()] as $exchangeRate) { foreach ($this->exchangeRates[$currency->getId()] as $exchangeRate) {
if ($exchangeRate->getValidFrom() > $time) { if ($exchangeRate->getValidFromDate() > $time) {
break; break;
} }
$currentExchangeRate = $exchangeRate; $currentExchangeRate = $exchangeRate;