summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-20 20:28:44 +0300
committereug-vs <eug-vs@keemail.me>2021-03-20 20:28:44 +0300
commit42cc6be0fc083ff5f7897a9e214918d750cb59ff (patch)
tree8127b59842c01636593dbe87fa69c62d7efad47c
parentafa1d1371c10878f395f95279beac5bb0aec6963 (diff)
downloadcommercel-api-42cc6be0fc083ff5f7897a9e214918d750cb59ff.tar.gz
feat: use UTC date parsing
-rw-r--r--src/services/uploads.service.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/uploads.service.ts b/src/services/uploads.service.ts
index 3479d0f..2a887e4 100644
--- a/src/services/uploads.service.ts
+++ b/src/services/uploads.service.ts
@@ -40,7 +40,7 @@ const parseTransfersBill = async (context: HookContext): Promise<HookContext> =>
} else if (cols.length === 7) {
const [dateString, doc, op, code, account, debet, credit] = cols;
try {
- const date = moment(dateString, 'DD.MM.YYYY').toISOString();
+ const date = moment.utc(dateString, 'DD.MM.YYYY').toISOString();
acc.push({ date, doc, op, code, account, debet, credit });
} catch (e) {
console.log(`Skipping row because not a date: ${dateString}`);