From 877588c3f4e148b3a8cc714505d28fff7dcfcf68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 2 Nov 2020 12:03:28 +0100 Subject: [PATCH] Fix offset calculation in Date/Time/Relative --- .../install/files/js/WoltLabSuite/Core/Date/Time/Relative.js | 3 +-- .../install/files/ts/WoltLabSuite/Core/Date/Time/Relative.ts | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) 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