From cabf232ea5fabea21169a6f6bdbbdddefabfa2a2 Mon Sep 17 00:00:00 2001 From: mykulh Date: Fri, 14 Jun 2024 10:45:00 +0100 Subject: [PATCH] Updated file for 2024 --- .../operations/FromChromeBrowserTimeStamp.mjs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/core/operations/FromChromeBrowserTimeStamp.mjs b/src/core/operations/FromChromeBrowserTimeStamp.mjs index 38eba3ff..0a0af02a 100644 --- a/src/core/operations/FromChromeBrowserTimeStamp.mjs +++ b/src/core/operations/FromChromeBrowserTimeStamp.mjs @@ -18,7 +18,6 @@ class FromChromeBrowserTimestamp extends Operation { */ constructor() { super(); - this.name = "From Chrome Browser Timestamp"; this.module = "Default"; this.description = "Converts Chrome Browser Timestamp to datetime string

e.g. 12883423549000000 \ @@ -36,12 +35,12 @@ class FromChromeBrowserTimestamp extends Operation { * @throws {OperationError} if invalid unit */ run(input, args) { - - const d = moment.unix((input /1000000) - 11644473600); - return d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss") + " UTC"; - - throw new OperationError(); + try{ + const d = moment.unix((input /1000000) - 11644473600); + return d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss") + " UTC"; + } catch { + throw new OperationError(); + } } } - -export default FromChromeBrowserTimestamp; +export default FromChromeBrowserTimestamp; \ No newline at end of file