From 1ce513031e0d320a1845ed35f7c5e20453c8230f Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Sat, 4 Jan 2025 12:47:04 +0300 Subject: [PATCH] fix date --- static/blogin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/blogin.js b/static/blogin.js index d147e92..daadf77 100644 --- a/static/blogin.js +++ b/static/blogin.js @@ -181,7 +181,9 @@ function renderStatus(status) { instance.target = "_blank"; let timestamp = document.createElement("span"); timestamp.classList.add("timestamp", "date", "date-rfc3339"); - timestamp.innerText = new Date(Date.UTC(status.timestamp)).toISOString(); + let d = + Date.parse(status.timestamp) + new Date().getTimezoneOffset() * 60000; + timestamp.innerText = new Date(d).toISOString(); meta.append(username, at, instance, " at ", timestamp); quote.appendChild(meta);