Add timezone to date objects

This commit is contained in:
James Cole
2024-11-06 11:57:12 +01:00
parent 038790a5d6
commit 7af9dce33b
22 changed files with 169 additions and 139 deletions

View File

@@ -232,16 +232,16 @@ class AccountBalanceCalculator
/** @var AccountBalance $object */
$object = $account->accountBalances()->firstOrCreate(
[
'title' => 'running_balance',
'balance' => '0',
'title' => 'running_balance',
'balance' => '0',
'transaction_currency_id' => $currencyId,
'date' => $balance[1],
'date_tz' => $balance[1]->format('e'),
'date' => $balance[1],
'date_tz' => $balance[1]->format('e'),
]
);
$object->balance = $balance[0];
$object->date = $balance[1];
$object->date_tz = $balance[1]->format('e');
$object->date_tz = $balance[1]->format('e');
$object->save();
}
}