Update ToWindows64bitTimeStamp.mjs

This commit is contained in:
Michael H 2024-06-12 12:35:26 +01:00 committed by GitHub
parent 55320d5734
commit 666e13ebe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,6 @@
*/ */
import Operation from "../Operation.mjs"; import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs";
import moment from "moment-timezone"; import moment from "moment-timezone";
/** /**
@ -26,7 +25,7 @@ class ToWindows64bitTimestamp extends Operation {
this.inputType = "string"; this.inputType = "string";
this.outputType = "string"; this.outputType = "string";
this.args = [ this.args = [
{ {
"name": "Show parsed datetime", "name": "Show parsed datetime",
"type": "boolean", "type": "boolean",
"value": true "value": true
@ -42,7 +41,7 @@ class ToWindows64bitTimestamp extends Operation {
*/ */
run(input, args) { run(input, args) {
const [showDateTime] = args, const [showDateTime] = args,
d = moment.utc(input); d = moment.utc(input);
let result = d.unix(); let result = d.unix();
const step1 = result + 11644473600; const step1 = result + 11644473600;
const hexString = (step1 * 10000000).toString(16); const hexString = (step1 * 10000000).toString(16);