Update ToFirefoxBrowserTimeStamp.mjs

This commit is contained in:
Michael H 2024-06-12 09:40:55 +01:00 committed by GitHub
parent bf132feef7
commit 7c75618d34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,8 +43,8 @@ class ToFirefoxBrowserTimestamp extends Operation {
* @throws {OperationError} if invalid unit * @throws {OperationError} if invalid unit
*/ */
run(input, args) { run(input, args) {
const [showDateTime] = args, const [showDateTime] = args,
d = moment.utc(input); d = moment.utc(input);
let result = (d.unix() * 1000000); let result = (d.unix() * 1000000);
return showDateTime ? `${result} (${d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss")} UTC)` : result.toString(); return showDateTime ? `${result} (${d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss")} UTC)` : result.toString();
} }