resolved timezones

This commit is contained in:
Čarodej
2022-02-06 14:26:42 +01:00
parent 38e86b4b8b
commit 21e184f373
10 changed files with 37 additions and 54 deletions

View File

@@ -133,13 +133,13 @@ class UserStorageResource extends JsonResource
->get();
$upload = $trafficRecords->map(fn ($record) => [
'created_at' => format_date($record->created_at, '%d. %B'),
'created_at' => format_date($record->created_at, 'd. M. '),
'percentage' => $uploadMax !== 0 ? round(($record->upload / $uploadMax) * 100, 2) : 0,
'amount' => Metric::bytes($record->upload)->format(),
]);
$download = $trafficRecords->map(fn ($record) => [
'created_at' => format_date($record->created_at, '%d. %B'),
'created_at' => format_date($record->created_at, 'd. M. '),
'percentage' => $downloadMax !== 0 ? round(($record->download / $downloadMax) * 100, 2) : 0,
'amount' => Metric::bytes($record->download)->format(),
]);