diff --git a/src/utils/common.js b/src/utils/common.js index c1845d247..b8f5a7bb1 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -145,6 +145,13 @@ export function getDaysFuture(days, now) { return new Date(now.getTime() + 3600 * 1000 * 24 * days) } +export function getDayEnd(now) { + if (!now) { + now = new Date() + } + return new Date(new Date(now.toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1) +} + export function setUrlParam(url, name, value) { const urlArray = url.split('?') if (urlArray.length === 1) { diff --git a/src/views/audits/CommandExecutionList.vue b/src/views/audits/CommandExecutionList.vue index 221195114..8e474dc0c 100644 --- a/src/views/audits/CommandExecutionList.vue +++ b/src/views/audits/CommandExecutionList.vue @@ -9,7 +9,7 @@