From 4d75206d3ebcc50607377721ccefc7a37ac71796 Mon Sep 17 00:00:00 2001 From: Michael H Date: Wed, 12 Jun 2024 14:01:09 +0100 Subject: [PATCH] Update ToMacAbsoluteTimestamp.mjs --- src/core/operations/ToMacAbsoluteTimestamp.mjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/operations/ToMacAbsoluteTimestamp.mjs b/src/core/operations/ToMacAbsoluteTimestamp.mjs index 54554029..7bab5cff 100644 --- a/src/core/operations/ToMacAbsoluteTimestamp.mjs +++ b/src/core/operations/ToMacAbsoluteTimestamp.mjs @@ -26,7 +26,7 @@ class ToMacAbsoluteTimestamp extends Operation { this.inputType = "string"; this.outputType = "string"; this.args = [ - { + { "name": "Show parsed datetime", "type": "boolean", "value": true @@ -41,11 +41,10 @@ class ToMacAbsoluteTimestamp extends Operation { * @throws {OperationError} if invalid unit */ run(input, args) { - const [showDateTime] = args, - d = moment.utc(input); - let result = (d.unix()-978307200); - return showDateTime ? `${result} (${d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss")} UTC)` : result.toString(); + const [showDateTime] = args, + d = moment.utc(input); + let result = (d.unix()-978307200); + return showDateTime ? `${result} (${d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss")} UTC)` : result.toString(); } } - export default ToMacAbsoluteTimestamp;