Skip to content

Commit

Permalink
Use ISO date for reruns of operations, better sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Brigham committed Jun 7, 2024
1 parent b5f7315 commit e6be581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stores/operationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ export const useOperationStore = defineStore("operationStore", {
let { id, start, state, chain, host_group, ...newOp } =
this.operations[this.selectedOperationID];
let dateMatches = newOp.name.match(
/[(]\d{1,2}\/\d{1,2}\/\d{2,4}, \d{1,2}:\d{2}:\d{2} [A|P]M[)]$/g
/[(]\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{1,3}Z[)]$/g
);
let stringToReplace =
dateMatches && dateMatches.length
? dateMatches[dateMatches.length - 1]
: "";
let date = `(${new Date().toLocaleString()})`;
let date = `(${new Date().toISOString()})`;
newOp.name = stringToReplace
? newOp.name.replace(stringToReplace, date)
: `${newOp.name} ${date}`;
Expand Down

0 comments on commit e6be581

Please sign in to comment.