Call correct timezone.

This commit is contained in:
James Cole 2020-07-17 18:51:35 +02:00
parent 7aa3cd5ba4
commit cd65d4d4c5
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
2 changed files with 4 additions and 5 deletions

View File

@ -554,9 +554,9 @@ class GroupCollector implements GroupCollectorInterface
$result['updated_at'] = new Carbon($result['updated_at'], 'UTC');
// this is going to happen a lot:
$result['date']->setTimezone(env('TZ'));
$result['created_at']->setTimezone(env('TZ'));
$result['updated_at']->setTimezone(env('TZ'));
$result['date']->setTimezone(config('app.timezone'));
$result['created_at']->setTimezone(config('app.timezone'));
$result['updated_at']->setTimezone(config('app.timezone'));
} catch (Exception $e) {
Log::error($e->getMessage());
}

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 ? ' ' : '';