Call correct timezone.

This commit is contained in:
James Cole
2020-07-17 18:51:35 +02:00
parent 7aa3cd5ba4
commit cd65d4d4c5
2 changed files with 4 additions and 5 deletions

View File

@@ -143,9 +143,8 @@ class Amount
public function formatFlat(string $symbol, int $decimalPlaces, string $amount, bool $coloured = null): string
{
$coloured = $coloured ?? true;
$float = round($amount, 12);
$info = $this->getLocaleInfo();
$formatted = number_format($float, $decimalPlaces, $info['mon_decimal_point'], $info['mon_thousands_sep']);
$formatted = number_format((float) $amount, $decimalPlaces, $info['mon_decimal_point'], $info['mon_thousands_sep']);
$precedes = $amount < 0 ? $info['n_cs_precedes'] : $info['p_cs_precedes'];
$separated = $amount < 0 ? $info['n_sep_by_space'] : $info['p_sep_by_space'];
$space = true === $separated ? ' ' : '';