I'm using the following code to convert windows time to unix timestamp,
def convert_windows_time(windows_time):
return datetime.datetime(1601, 1, 1) + datetime.timedelta(microseconds=windows_time / 10)
How can I do the same in nodejs? This does not work, it results in a different date:
let a = parseInt(129436810067618693)
let b = (new Date('1601-01-01').getMilliseconds()) + a / 10
console.log(new Date(b / 10000))
Any ideas what's wrong?