From: Tim Düsterhus Date: Mon, 2 Nov 2020 11:03:28 +0000 (+0100) Subject: Fix offset calculation in Date/Time/Relative X-Git-Tag: 5.4.0_Alpha_1~659 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=877588c3f4e148b3a8cc714505d28fff7dcfcf68;p=GitHub%2FWoltLab%2FWCF.git Fix offset calculation in Date/Time/Relative --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Time/Relative.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Time/Relative.js index dd3eb78ac5..0d00a0a41c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Time/Relative.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Time/Relative.js @@ -42,8 +42,6 @@ define(["require", "exports", "tslib", "../../Core", "../Util", "../../Dom/Chang } const date = new Date(); const timestamp = (date.getTime() - date.getMilliseconds()) / 1000; - if (_offset === null) - _offset = timestamp - window.TIME_NOW; document.querySelectorAll("time").forEach((element) => { rebuild(element, date, timestamp); }); @@ -96,6 +94,7 @@ define(["require", "exports", "tslib", "../../Core", "../Util", "../../Dom/Chang * Transforms