Skip to content

Commit

Permalink
Prints timezones aren't UTC?
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsumi-sama committed Nov 22, 2024
1 parent 4011958 commit cf0fc37
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions html/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit cf0fc37

Please sign in to comment.