Skip to content

Commit 7fb424e

Browse files
Crovitche-1623fabpot
authored andcommitted
[Form] Add new active_at, not_active_at and legal_tender options to CurrencyType
1 parent b6a7f63 commit 7fb424e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Currencies.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ private static function isDateActive(string $country, string $currency, array $c
225225
throw new \RuntimeException("Cannot check whether the currency $currency is active or not in $country because they are no validity dates available.");
226226
}
227227

228-
$from = \DateTimeImmutable::createFromFormat('Y-m-d', $currencyMetadata['from']);
228+
$from = \DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s', $currencyMetadata['from'], new \DateTimeZone('Etc/UTC'));
229229

230230
if (\array_key_exists('to', $currencyMetadata)) {
231-
$to = \DateTimeImmutable::createFromFormat('Y-m-d', $currencyMetadata['to']);
231+
$to = \DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s', $currencyMetadata['to'], new \DateTimeZone('Etc/UTC'));
232232
} else {
233233
$to = null;
234234
}

0 commit comments

Comments
 (0)