This commit is contained in:
Fine0830
2022-04-21 12:39:06 +08:00
committed by GitHub
parent 6bfb7915bb
commit 393885324b
2 changed files with 8 additions and 8 deletions

View File

@@ -88,12 +88,9 @@ export const appStore = defineStore({
this.duration.start.getMonth());
break;
}
const utcArr = this.utc.split(":");
const utcHour = isNaN(Number(utcArr[0])) ? 0 : Number(utcArr[0]);
const utcMin = isNaN(Number(utcArr[1])) ? 0 : Number(utcArr[1]);
const utcSpace =
(utcHour + new Date().getTimezoneOffset() / 60) * 3600000 +
utcMin * 60000;
(this.utcHour + new Date().getTimezoneOffset() / 60) * 3600000 +
this.utcMin * 60000;
const startUnix: number = this.duration.start.getTime();
const endUnix: number = this.duration.end.getTime();
const timeIntervals: string[] = [];
@@ -155,6 +152,10 @@ export const appStore = defineStore({
}
this.utc = res.data.data.getTimeInfo.timezone / 100 + ":0";
const utcArr = this.utc.split(":");
this.utcHour = isNaN(Number(utcArr[0])) ? 0 : Number(utcArr[0]);
this.utcMin = isNaN(Number(utcArr[1])) ? 0 : Number(utcArr[1]);
return res.data;
},
async fetchVersion(): Promise<void> {