Update FromFirefoxBrowserTimeStamp.mjs

This commit is contained in:
Michael H 2024-06-12 09:29:58 +01:00 committed by GitHub
parent d777a7c3a8
commit 9a80f18a13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,6 @@ class FromFirefoxBrowserTimestamp extends Operation {
*/ */
constructor() { constructor() {
super(); super();
this.name = "From Firefox Browser Timestamp"; this.name = "From Firefox Browser Timestamp";
this.module = "Default"; this.module = "Default";
this.description = "Converts Firefox Browser Timestamp to datetime string<br><br>e.g. <code>1341575244735000</code> \ this.description = "Converts Firefox Browser Timestamp to datetime string<br><br>e.g. <code>1341575244735000</code> \
@ -36,11 +35,8 @@ class FromFirefoxBrowserTimestamp extends Operation {
* @throws {OperationError} if invalid unit * @throws {OperationError} if invalid unit
*/ */
run(input, args) { run(input, args) {
const d = moment.unix((input /1000000)); const d = moment.unix((input /1000000));
return d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss") + " UTC"; return d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss") + " UTC";
throw new OperationError();
} }
} }