elapsed_t: handle DST in day/month/year mode

master
paul-arg 2024-06-12 19:09:58 +02:00 committed by GitHub
parent 4e428a6fbc
commit 532abba4d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ function diffToTarget() {
diff.M = end.getMonth() - start.getMonth();
diff.D = end.getDate() - start.getDate();
diff.hh = end.getHours() - start.getHours();
diff.mm = end.getMinutes() - start.getMinutes();
diff.mm = end.getMinutes() - start.getMinutes() + end.getTimezoneOffset() - start.getTimezoneOffset();
diff.ss = end.getSeconds() - start.getSeconds();
// Adjust negative differences