Update FromHFSPlusTimeStamp.mjs

This commit is contained in:
Michael H 2024-06-12 09:28:31 +01:00 committed by GitHub
parent 4565d85e33
commit 6fbb5b5ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,12 +34,9 @@ class FromHFSPlusTimestamp extends Operation {
* @throws {OperationError} if invalid unit * @throws {OperationError} if invalid unit
*/ */
run(input, args) { run(input, args) {
const h = parseInt(input, 16); const h = parseInt(input, 16);
const d = moment.unix(h - 2082844800); const d = moment.unix(h - 2082844800);
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();
} }
} }