Skip to content

Commit

Permalink
feat(ls): - improves ls display for running events
Browse files Browse the repository at this point in the history
If there is a running entry, `ls` would show `Invalid date`. This improves that to show that it is currently running.

Fixes #92
  • Loading branch information
beauraines committed Oct 17, 2023
1 parent e25b052 commit 554ed05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmds/ls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const handler = async function (argv) {
project: projects.filter(p => p.id == element.project_id)[0]?.name,
project_id: projects.filter(p => p.id == element.project_id)[0]?.id,
start: convertUtcTime(element.start),
stop: convertUtcTime(element.stop),
stop: convertUtcTime(element.stop) == 'Invalid Date' ? 'Currently Running' : convertUtcTime(element.stop),
duration: formatDuration(element.duration * 1000),
id: element.id
}
Expand Down

0 comments on commit 554ed05

Please sign in to comment.