43081j / 43081j/rar.js

`parseEntryTime` need to multiply seconds by 2

未關閉
#21 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
513
分支
52
PR 合併指標
30 天內沒有已合併 PR

描述

https://github.com/43081j/rar.js/blob/0d180e08a7f900ed0f153d3100a6ca9765a819dd/src/rar.ts#L123

```
private parseEntryTime(time: string) {
if (time.length < 32) {
time = (new Array(32 - time.length + 1)).join('0') + time;
}
const matches = time.match(/(\d{7})(\d{4})(\d{5})(\d{5})(\d{6})(\d{5})/);
if (!matches) {
return new Date();
}
const vals = matches.slice(1).map((val) => {
return parseInt(val, 2);
});
return new Date(1980 + vals[0], vals[1] - 1, vals[2], vals[3], vals[4], vals[5] * 2);
}
```
https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-dosdatetimetovarianttime

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。