Browse Source

Bugfix/prevent date offset in cash balance records (#4906)

* Prevent date offset in cash balance records

* Update changelog
pull/4940/head
Diego Noah 2 weeks ago
committed by GitHub
parent
commit
3ea72af5a0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 5
      libs/ui/src/lib/account-balances/account-balances.component.ts

1
CHANGELOG.md

@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed a date offset issue with account balances
- Fixed missing `/.well-known/assetlinks.json` for TWA
## 2.170.0 - 2025-06-11

5
libs/ui/src/lib/account-balances/account-balances.component.ts

@ -2,7 +2,7 @@ import { CreateAccountBalanceDto } from '@ghostfolio/api/app/account-balance/cre
import { ConfirmationDialogType } from '@ghostfolio/client/core/notification/confirmation-dialog/confirmation-dialog.type';
import { NotificationService } from '@ghostfolio/client/core/notification/notification.service';
import { validateObjectForForm } from '@ghostfolio/client/util/form.util';
import { getLocale } from '@ghostfolio/common/helper';
import { DATE_FORMAT, getLocale } from '@ghostfolio/common/helper';
import { AccountBalancesResponse } from '@ghostfolio/common/interfaces';
import {
@ -31,6 +31,7 @@ import { MatInputModule } from '@angular/material/input';
import { MatMenuModule } from '@angular/material/menu';
import { MatSort, MatSortModule } from '@angular/material/sort';
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
import { format } from 'date-fns';
import { get } from 'lodash';
import { Subject } from 'rxjs';
@ -114,7 +115,7 @@ export class GfAccountBalancesComponent
const accountBalance: CreateAccountBalanceDto = {
accountId: this.accountId,
balance: this.accountBalanceForm.get('balance').value,
date: this.accountBalanceForm.get('date').value.toISOString()
date: format(this.accountBalanceForm.get('date').value, DATE_FORMAT)
};
try {

Loading…
Cancel
Save