Calculate timezone offset based on input

This commit is contained in:
NotSaifA 2024-05-24 06:17:19 -04:00 committed by GitHub
parent bd03c43716
commit b49eb09a08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,7 @@ export function parseISO8601Date(s, toLocal) {
ms += offset;
}
} else if (toLocal === false) {
ms += new Date().getTimezoneOffset() * 60000;
ms += new Date(ms).getTimezoneOffset() * 60000;
}
return new Date(ms);