File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
scheduler/src/common/helper Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import { GarmsExtractType } from 'src/modules/common/enum/garms-extract-type.enu
20
20
import { DateTransaction } from 'src/modules/garms/dto/DateTransation.dto' ;
21
21
import { GarmaCashDetail } from 'src/modules/garms/dto/garms-cash-details.dto' ;
22
22
import { GarmaCashHeader } from 'src/modules/garms/dto/garms-cash-header.dto' ;
23
- import { dateFormat } from './date-time.helper' ;
23
+ import { convertUtcToPt , dateFormat } from './date-time.helper' ;
24
24
import * as fs from 'fs' ;
25
25
import * as path from 'path' ;
26
26
import { InternalServerErrorException , Logger } from '@nestjs/common' ;
@@ -275,11 +275,9 @@ export const groupTransactionsByDate = (transactions: Transaction[]) => {
275
275
// Group transactions by the date (ignoring the time part)
276
276
const groupedData : Record < string , Transaction [ ] > = transactions . reduce (
277
277
( acc , transaction ) => {
278
+
278
279
// Extract just the date part (YYYY-MM-DD)
279
- const transactionDate = transaction . transactionSubmitDate
280
- . toISOString ( )
281
- . split ( 'T' ) [ 0 ] ;
282
-
280
+ const transactionDate = convertUtcToPt ( transaction . transactionSubmitDate , "YYYY-MM-DD" ) ;
283
281
// If the date group doesn't exist, create it
284
282
if ( ! acc [ transactionDate ] ) {
285
283
acc [ transactionDate ] = [ ] ;
You can’t perform that action at this time.
0 commit comments