Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode datetime values #58

Open
mogadanez opened this issue Jan 18, 2020 · 2 comments
Open

Decode datetime values #58

mogadanez opened this issue Jan 18, 2020 · 2 comments

Comments

@mogadanez
Copy link

trying to do same as EndOfFile

           for (var i = 0; i < v.length; i++) {
               val += v[i] * Math.pow(2, i * 8);
           }

got "CreationTime": 132221877448853630
which is not valid timestamp

in which format it is transfered

@julien-f
Copy link
Member

@sachinraste
Copy link

sachinraste commented Jul 3, 2020

function convert(time){
  var winTicks = 10000000;
  var uEpoch = 11644473600;

  var unixTime = time/winTicks - uEpoch;
  console.log(unixTime);
  var utc = new Date(unixTime * 1000).toUTCString();
  console.log("utc",utc)
}
convert(132291632112018540)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants