1
0
Fork 0

correct timezone CEST instead of EET

main
Kim Huebel 4 years ago
parent bf7e60a284
commit 237a73977c

@ -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() { function getTimezone() {
if (useClientTimezone) { if (useClientTimezone) {
var d = new Date(); var d = new Date();
@ -104,6 +114,8 @@ function getTimezone() {
timezone = timezonenames[offset]; timezone = timezonenames[offset];
} }
if (d.isDstObserved() && timezone == "EET")
timezone = "CEST";
return timezone; return timezone;
} else { } else {
return "UTC"; return "UTC";

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

Loading…
Cancel
Save