1

不敢相信我找不到将 Javascript 日期对象转换为 Filetime 的非常简单的案例。
搜索时出现了很多其他方式。

我为其他正在寻找它的人提供了以下解决方案。

4

1 回答 1

3

现在转换为 Filetime:

function filetimeFromDate(date) {  
    return date.getTime() * 1e4 + 116444736e9;
}
const now = new Date();
const filetimeNow = filetimeFromDate(now);
console.log(filetimeNow);

于 2019-01-30T10:17:49.577 回答