Skip to content

Commit

Permalink
iso based formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo4815162342 committed Feb 27, 2024
1 parent d71d5d2 commit 7126679
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,13 @@ export async function run(argv: NodeJS.Process['argv']) {

await batchStreamWriter.writeBatch(
processedBatch,
dateFormat ? timeStamp => dayjs(timeStamp).utc().format(dateFormat) : undefined
dateFormat
? timeStamp => {
return dateFormat === 'iso'
? new Date(timeStamp).toISOString()
: dayjs(timeStamp).utc().format(dateFormat);
}
: undefined
);
}

Expand Down

0 comments on commit 7126679

Please sign in to comment.