From 42cc6be0fc083ff5f7897a9e214918d750cb59ff Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 20 Mar 2021 20:28:44 +0300 Subject: feat: use UTC date parsing --- src/services/uploads.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 => } 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}`); -- cgit v1.2.3