utc in request

This commit is contained in:
Fran Jurmanović
2021-06-27 13:29:04 +02:00
parent 5583ee9586
commit 0b7d8af32b
2 changed files with 7 additions and 3 deletions

View File

@@ -11,6 +11,8 @@ import { AppFormElement, InputFieldElement } from 'components/';
import { BasePageElement } from 'common/';
import { AppDropdownElement } from 'components/app-dropdown/AppDropdownElement';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
dayjs.extend(utc);
@controller
class SubscriptionCreateElement extends BasePageElement {
@@ -118,8 +120,8 @@ class SubscriptionCreateElement extends BasePageElement {
endDate,
} = values;
const startDateFormat = dayjs(startDate).format();
const endDateFormat = dayjs(endDate).format();
const startDateFormat = dayjs(startDate).utc(true).format();
const endDateFormat = dayjs(endDate).utc(true).format();
const walletData = this.walletData;

View File

@@ -6,6 +6,8 @@ import { RouterService } from 'core/services';
import { BasePageElement } from 'common/';
import { AppDropdownElement } from 'components/app-dropdown/AppDropdownElement';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
dayjs.extend(utc);
@controller
class TransactionCreateElement extends BasePageElement {
@@ -93,7 +95,7 @@ class TransactionCreateElement extends BasePageElement {
transactionDate,
} = values;
const formattedDate = dayjs(transactionDate).format();
const formattedDate = dayjs(transactionDate).utc(true).format();
const walletData = this.walletData;