1
0
Fork 0

correct timezone CEST instead of EET

This commit is contained in:
Kim Huebel 2021-04-23 22:25:46 +01:00
parent bf7e60a284
commit 237a73977c
2 changed files with 13 additions and 1 deletions

View file

@ -84,6 +84,16 @@ function checkConfigStructure() {
}
}
Date.prototype.stdTimezoneOffset = function () {
var jan = new Date(this.getFullYear(), 0, 1);
var jul = new Date(this.getFullYear(), 6, 1);
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
}
Date.prototype.isDstObserved = function () {
return this.getTimezoneOffset() < this.stdTimezoneOffset();
}
function getTimezone() {
if (useClientTimezone) {
var d = new Date();
@ -104,6 +114,8 @@ function getTimezone() {
timezone = timezonenames[offset];
}
if (d.isDstObserved() && timezone == "EET")
timezone = "CEST";
return timezone;
} else {
return "UTC";

View file

@ -1 +1 @@
var dashboard_version = "2021-04-22 19:08:37";
var dashboard_version = "2021-04-23 22:25:46";