From 32f17ba99e0701c31376e072d40838aaa1206618 Mon Sep 17 00:00:00 2001 From: quenousimporte <76260127+quenousimporte@users.noreply.github.com> Date: Mon, 30 Jan 2023 10:08:15 +0100 Subject: [PATCH] fixed: time stamps in local time zone --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index d6ad722..296f70d 100644 --- a/main.js +++ b/main.js @@ -1613,7 +1613,10 @@ function loadquicknote() function timestamp() { - return (new Date).toISOString().replace("T", " ").replace(/\..*/, "").replace(/:/g, "."); + var utc = new Date(); + var loc = new Date(utc - utc.getTimezoneOffset() * 60 * 1000); + + return loc.toISOString().replace("T", " ").replace(/\..*/, "").replace(/:/g, "."); } function startnewnote()