fix: 修复重置天数微妙的偏差

This commit is contained in:
xream 2024-03-11 19:33:51 +08:00
parent 4b27d40602
commit 09495fa607
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.247",
"version": "2.14.248",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -172,6 +172,7 @@ export function getRmainingDays(opt = {}) {
resetDate.setDate(resetDate.getDate() + cycleDays);
}
resetDate.setHours(0, 0, 0, 0);
const timeDiff = resetDate.getTime() - today.getTime();
const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));