From 265a6f88edc62051ee49dfd591d6bc79b3cf3c8f Mon Sep 17 00:00:00 2001 From: Natsumi Date: Fri, 22 Nov 2024 23:46:31 +1300 Subject: [PATCH] Prints timezones aren't UTC? --- html/src/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 433f3426..40df90dd 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -17567,6 +17567,8 @@ speechSynthesis.getVoices(); var r = new FileReader(); r.onload = function () { var date = new Date(); + // why the fuck isn't this UTC + date.setMinutes(date.getMinutes() - date.getTimezoneOffset()); var timestamp = date.toISOString().slice(0, 19); var params = { note: $app.printUploadNote, @@ -17645,10 +17647,10 @@ speechSynthesis.getVoices(); $app.methods.getPrintDate = function (print) { var createdAt = new Date(); - if (print.timestamp) { - createdAt = new Date(print.timestamp); - } else if (print.createdAt) { + if (print.createdAt) { createdAt = new Date(print.createdAt); + } else if (print.timestamp) { + createdAt = new Date(print.timestamp); } return createdAt; };