Merge a3aa45a96b432a54996ff8c48706b3e812b6e6b0 into f4d4b1a1df651949c2c2626753faf6c8a172bf91

This commit is contained in:
Darío 2024-12-02 09:04:00 +01:00 committed by GitHub
commit c85a7f3294
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,8 +103,7 @@ const getActivity = (): SetActivity => {
if (includeTimestamps) {
const currentSeconds = convertDurationToSeconds(mediaInfo.current);
const durationSeconds = convertDurationToSeconds(mediaInfo.duration);
const date = new Date();
const now = Math.floor(date.getTime() / 1000);
const now = Math.trunc((Date.now() + 500) / 1000);
presence.startTimestamp = now - currentSeconds;
presence.endTimestamp = presence.startTimestamp + durationSeconds;
}