diff options
| author | Fuwn <[email protected]> | 2023-09-06 15:17:28 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-06 15:17:28 -0700 |
| commit | d8eb6695391a30d4f6a5f92392e2e97b4228143f (patch) | |
| tree | 1cf6e0cf3f39680db639a799a7329e88abae0289 /src/lib/AniList | |
| parent | fix(activity): last activity check (diff) | |
| download | due.moe-d8eb6695391a30d4f6a5f92392e2e97b4228143f.tar.xz due.moe-d8eb6695391a30d4f6a5f92392e2e97b4228143f.zip | |
feat(activity): strengthen last activity
Diffstat (limited to 'src/lib/AniList')
| -rw-r--r-- | src/lib/AniList/activity.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/AniList/activity.ts b/src/lib/AniList/activity.ts index aa22a590..7a09aed8 100644 --- a/src/lib/AniList/activity.ts +++ b/src/lib/AniList/activity.ts @@ -17,9 +17,10 @@ export const lastActivityDate = async (userIdentity: UserIdentity): Promise<Date }) ).json() )['data']['User']['stats']['activityHistory']; - const date = new Date(0); - - date.setUTCSeconds(activityHistory[activityHistory.length - 1]['date']); + const date = new Date( + Number(activityHistory[activityHistory.length - 1]['date']) * 1000 + + new Date().getTimezoneOffset() + ); return date; }; |