From e6be581859f9a26fe2263eace9305d7733210021 Mon Sep 17 00:00:00 2001 From: Tim Brigham Date: Fri, 7 Jun 2024 13:04:03 -0400 Subject: [PATCH] Use ISO date for reruns of operations, better sorting --- src/stores/operationStore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/operationStore.js b/src/stores/operationStore.js index 5d99799..a1feae1 100644 --- a/src/stores/operationStore.js +++ b/src/stores/operationStore.js @@ -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}`;