mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2024-11-23 07:17:43 +01:00
Forgot to convert the time
This commit is contained in:
parent
3853cf9e11
commit
17fb18763a
1 changed files with 10 additions and 2 deletions
|
@ -175,6 +175,14 @@
|
|||
isEdit = false;
|
||||
}
|
||||
|
||||
function convertTime(data) {
|
||||
for (const pull of data.pulls) {
|
||||
pull.time = dayjs.unix(pull.time).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function readLocalData() {
|
||||
console.log('wish read local');
|
||||
const prefix = getAccountPrefix();
|
||||
|
@ -183,8 +191,8 @@
|
|||
if (data !== null) {
|
||||
let counterData = data;
|
||||
if (typeof data === 'string') {
|
||||
counterData = JSON.parse(data);
|
||||
await updateSave(`${prefix}${path}`, JSON.parse(data), true);
|
||||
const converted = convertTime(JSON.parse(data));
|
||||
await updateSave(`${prefix}${path}`, converted, true);
|
||||
}
|
||||
|
||||
total = counterData.total;
|
||||
|
|
Loading…
Reference in a new issue